Darling build changes

This commit is contained in:
Lubos Dolezel 2015-11-16 23:06:25 +01:00
parent 2def22809b
commit c8bdb97c1a
2 changed files with 9 additions and 3 deletions

View File

@ -11,7 +11,6 @@ set(CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}")
# Darling: extras
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc -ggdb")
set(CMAKE_SHARED_LINKER_FLAGS "-nostdlib -Wl,--version-script=${DARLING_TOP_DIRECTORY}/darwin.map")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,--defsym=__objc_personality_v0=__gnustep_objc_personality_v0")
set(CMAKE_CXX_IMPLICIT_LINK_LIBRARIES "")
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../../libcxxabi/include)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/../include)
@ -270,7 +269,7 @@ set_source_files_properties(${libblocks_SRCS} PROPERTIES COMPILE_FLAGS "-DBUILDI
add_subdirectory(darling)
add_library(objc SHARED ${libobjc_C_SRCS} ${libobjc_ASM_SRCS}
${libobjc_OBJC_SRCS} ${libobjc_CXX_SRCS} $<TARGET_OBJECTS:objc-apple>)
${libobjc_OBJC_SRCS} ${libobjc_CXX_SRCS})
# add_library(blocks SHARED ${libblocks_SRCS})
#target_link_libraries(objc darling-util-apple)
@ -366,6 +365,8 @@ set(GNUSTEP_INSTALL_TYPE "NONE")
#install(FILES ${libobjc_HDRS}
# DESTINATION "${HEADER_INSTALL_PATH}/${INCLUDE_DIRECTORY}")
set_target_properties(objc PROPERTIES LINK_FLAGS "-Wl,--defsym=__objc_personality_v0=__gnustep_objc_personality_v0")
install(TARGETS objc DESTINATION lib${SUFFIX}/darling)
set(CPACK_GENERATOR TGZ CACHE STRING

View File

@ -77,6 +77,11 @@ else(NOT OBJC_ABI_2)
)
endif(NOT OBJC_ABI_2)
add_library(objc-apple OBJECT ${objcdarwin_SRCS})
SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib${SUFFIX}/darling")
SET(CMAKE_BUILD_WITH_INSTALL_RPATH TRUE)
SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
add_library(objc-apple SHARED ${objcdarwin_SRCS})
target_link_libraries(objc-apple system objc cxx)
install(TARGETS objc-apple DESTINATION lib${SUFFIX}/darling)