darling-libxpc/CMakeLists.txt
2017-02-12 10:37:25 +03:00

38 lines
1.1 KiB
CMake

project(xpc)
cmake_minimum_required(VERSION 2.4.0)
enable_language(C ASM)
if(COMMAND cmake_policy)
cmake_policy(SET CMP0003 NEW)
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_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib -Wl,--version-script=${DARLING_TOP_DIRECTORY}/darwin.map")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/)
include_directories(${DARLING_TOP_DIRECTORY}/platform-include)
include_directories(${DARLING_TOP_DIRECTORY}/src/external/libdispatch)
include_directories(${DARLING_TOP_DIRECTORY}/src/launchd/liblaunch)
include_directories(${DARLING_TOP_DIRECTORY}/src/libc/fbsdcompat)
set(xpc_sources
mpack.c
xpc_array.c
xpc_connection.c
xpc_dictionary.c
xpc_misc.c
xpc_private.c
xpc_type.c
xpc_errors.c
transports/mach.c
)
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(xpc SHARED ${xpc_sources})
install(TARGETS xpc DESTINATION ${CMAKE_INSTALL_LIBDIR}/darling)