Browse Source

XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY for libjsengine

cl-refactor
Marek Kotewicz 10 years ago
parent
commit
d59944511d
  1. 12
      libjsengine/CMakeLists.txt

12
libjsengine/CMakeLists.txt

@ -8,10 +8,6 @@ endif()
set(CMAKE_AUTOMOC OFF)
# macos brew version of v8 needs to be compiled with libstdc++
# it also needs to be dynamic library
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++")
aux_source_directory(. SRC_LIST)
include_directories(BEFORE ..)
@ -23,6 +19,14 @@ file(GLOB HEADERS "*.h")
add_library(${EXECUTABLE} ${SRC_LIST} ${HEADERS})
# macos brew version of v8 needs to be compiled with libstdc++
# it also needs to be dynamic library
# xcode needs libstdc++ to be explicitly set as it's attribute
if (APPLE)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -stdlib=libstdc++")
set_property(TARGET ${EXECUTABLE} PROPERTY XCODE_ATTRIBUTE_CLANG_CXX_LIBRARY "libstdc++")
endif()
target_link_libraries(${EXECUTABLE} ${V8_LIBRARIES})
install( TARGETS ${EXECUTABLE} RUNTIME DESTINATION bin ARCHIVE DESTINATION lib LIBRARY DESTINATION lib )

Loading…
Cancel
Save