libsecurity_utilities now partially builds

This commit is contained in:
Lubos Dolezel 2016-11-28 14:27:53 +01:00
parent 58322810de
commit a479953317
5 changed files with 44 additions and 7 deletions

View File

@ -40,10 +40,12 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/OSX/libsecurity_keychain/libDER)
include_directories(${CMAKE_SOURCE_DIR}/src/copyfile)
include_directories(${CMAKE_SOURCE_DIR}/src/external/openssl/src/include)
include_directories(${CMAKE_SOURCE_DIR}/src/external/libxpc)
include_directories(${CMAKE_SOURCE_DIR}/src/external/IOKitUser)
include_directories(${CMAKE_SOURCE_DIR}/src/external/corecrypto/include)
include_directories(${CMAKE_SOURCE_DIR}/src/sandbox)
include_directories(${CMAKE_SOURCE_DIR}/src/launchd/liblaunch)
include_directories(${CMAKE_SOURCE_DIR}/src/libc/darwin)
include_directories(${CMAKE_SOURCE_DIR}/kernel-include/iokit)
include_directories(
${CMAKE_SOURCE_DIR}/src/external/corefoundation/Headers
${CMAKE_BINARY_DIR}/src/external/corefoundation/Headers

View File

@ -9,14 +9,16 @@ add_definitions(
add_subdirectory(libsecurity_keychain/libDER)
add_subdirectory(libsecurity_keychain/lib)
add_subdirectory(libsecurity_authorization/lib)
add_subdirectory(libsecurity_utilities/lib)
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}/darling")
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
add_library(Security SHARED
$<TARGET_OBJECTS:security_authorization>
$<TARGET_OBJECTS:security_utilities>
)
target_link_libraries(Security system auto)
target_link_libraries(Security system auto CFFExtra CFF sqlite3)
install(TARGETS Security DESTINATION ${CMAKE_INSTALL_LIBDIR}/darling)

View File

@ -0,0 +1,32 @@
#define SECURITY_DEBUG_LOG_ENABLED() 0
#define SECURITY_DEBUG_LOG(a,b)
#define SECURITY_EXCEPTION_COPY(a,b)
#define SECURITY_EXCEPTION_HANDLED(a)
#define SECURITY_EXCEPTION_THROW_UNIX(a,b)
#define SECURITY_EXCEPTION_THROW_OSSTATUS(a,b)
#define SECURITY_EXCEPTION_THROW_CF(a)
#define SECURITY_EXCEPTION_THROW_MACH(a,b)
#define SECURITY_EXCEPTION_THROW_SQLITE(a,b,c)
#define SECURITY_MACHSERVER_PORT_REMOVE(a)
#define SECURITY_MACHSERVER_PORT_ADD(a)
#define SECURITY_MACHSERVER_START_THREAD(a)
#define SECURITY_MACHSERVER_END_THREAD(a)
#define SECURITY_MACHSERVER_REAP(a,b)
#define SECURITY_MACHSERVER_RECEIVE_ENABLED() 0
#define SECURITY_MACHSERVER_RECEIVE(a)
#define SECURITY_MACHSERVER_RECEIVE_ERROR(a)
#define SECURITY_MACHSERVER_BEGIN(a,b)
#define SECURITY_MACHSERVER_END()
#define SECURITY_MACHSERVER_SEND_ERROR(a,b)
#define SECURITY_MACHSERVER_ALLOC_REGISTER(a,b)
#define SECURITY_MACHSERVER_ALLOC_RELEASE(a,b)
#define SECURITY_MACHSERVER_START_THREAD(a)
#define SECURITY_MACHSERVER_END_THREAD(a)
#define SECURITY_MACHSERVER_TIMER_START(a,b,c)
#define SECURITY_MACHSERVER_TIMER_END(a)
#define SECURITY_DEBUG_SEC_CREATE_ENABLED() 0
#define SECURITY_DEBUG_SEC_CREATE(a,b,c)
#define SECURITY_DEBUG_SEC_DESTROY(a)
#define SECURITY_DEBUG_DELAY(a)

View File

@ -10,7 +10,7 @@ endif(COMMAND cmake_policy)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2 -msse3 -w -nostdinc -fblocks")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__DARWIN_UNIX03 -fPIC -w")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc -nostdinc++ -fblocks -fPIC -Wno-deprecated -include ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/security-duct.h")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -nostdinc -nostdinc++ -fblocks -fPIC -Wno-deprecated -include ${CMAKE_CURRENT_SOURCE_DIR}/../../../include/security-duct.h -include ${CMAKE_CURRENT_SOURCE_DIR}/../dtrace_fake.h")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,--version-script=${DARLING_TOP_DIRECTORY}/darwin.map")
add_definitions(-D__strong=)
@ -46,7 +46,7 @@ set(security_utilities_sources
debugging.cpp
debugging_internal.cpp
devrandom.cpp
dispatch.cpp
#dispatch.cpp
dyldcache.cpp
endian.cpp
errors.cpp
@ -57,7 +57,7 @@ set(security_utilities_sources
headermap.cpp
hosts.cpp
inetreply.cpp
iodevices.cpp
#iodevices.cpp
ip++.cpp
kq++.cpp
logging.cpp
@ -65,10 +65,10 @@ set(security_utilities_sources
macho++.cpp
machrunloopserver.cpp
machserver.cpp
muscle++.cpp
#muscle++.cpp
osxcode.cpp
pcsc++.cpp
powerwatch.cpp
#pcsc++.cpp
#powerwatch.cpp
seccfobject.cpp
selector.cpp
simpleprefs.cpp

View File

@ -28,6 +28,7 @@
#include <security_utilities/utilities.h>
#include <CoreFoundation/CoreFoundation.h>
#include <dispatch/dispatch.h>
#include <sys/syslimits.h>
namespace Security
{