Fix naming of core library, get IO tests linking shared, and exclude OSG symbols from the core lib by setting headless mode.
This commit is contained in:
parent
4b02335637
commit
ae3f718fe3
@ -45,38 +45,48 @@ if(SIMGEAR_SHARED)
|
||||
get_property(sceneSources GLOBAL PROPERTY SCENE_SOURCES)
|
||||
get_property(publicHeaders GLOBAL PROPERTY PUBLIC_HEADERS)
|
||||
|
||||
add_library(SimGear SHARED ${coreSources})
|
||||
# set_property(TARGET SimGear PROPERTY FRAMEWORK 1)
|
||||
# message(STATUS "public header: ${publicHeaders}")
|
||||
set_property(TARGET SimGear PROPERTY PUBLIC_HEADER "${publicHeaders}")
|
||||
set_property(TARGET SimGear PROPERTY LINKER_LANGUAGE CXX)
|
||||
add_library(SimGearCore SHARED ${coreSources})
|
||||
set_property(TARGET SimGearCore PROPERTY COMPILE_FLAGS "-DNO_OPENSCENEGRAPH_INTERFACE=1")
|
||||
|
||||
target_link_libraries(SimGear ${ZLIB_LIBRARY})
|
||||
install(TARGETS SimGear LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
|
||||
# set_property(TARGET SimGearCore PROPERTY FRAMEWORK 1)
|
||||
# message(STATUS "public header: ${publicHeaders}")
|
||||
set_property(TARGET SimGearCore PROPERTY PUBLIC_HEADER "${publicHeaders}")
|
||||
set_property(TARGET SimGearCore PROPERTY LINKER_LANGUAGE CXX)
|
||||
|
||||
target_link_libraries(SimGearCore ${ZLIB_LIBRARY} ${RT_LIBRARY})
|
||||
install(TARGETS SimGearCore LIBRARY DESTINATION lib${LIB_SUFFIX}
|
||||
PUBLIC_HEADER DESTINATION include/simgear)
|
||||
|
||||
if(NOT SIMGEAR_HEADLESS)
|
||||
if(LIBSVN_FOUND)
|
||||
add_definitions(${APR_CFLAGS})
|
||||
if(NOT SIMGEAR_HEADLESS)
|
||||
if(LIBSVN_FOUND)
|
||||
add_definitions(${APR_CFLAGS})
|
||||
|
||||
IF(APPLE)
|
||||
set_property(SOURCE scene/tsync/terrasync.cxx PROPERTY COMPILE_FLAGS "-iwithsysroot ${LIBSVN_INCLUDE_DIR}")
|
||||
ELSE()
|
||||
include_directories(${LIBSVN_INCLUDE_DIR})
|
||||
ENDIF(APPLE)
|
||||
IF(APPLE)
|
||||
set_property(SOURCE scene/tsync/terrasync.cxx PROPERTY COMPILE_FLAGS "-iwithsysroot ${LIBSVN_INCLUDE_DIR}")
|
||||
ELSE()
|
||||
include_directories(${LIBSVN_INCLUDE_DIR})
|
||||
ENDIF(APPLE)
|
||||
endif(LIBSVN_FOUND)
|
||||
|
||||
|
||||
add_library(SimGearScene SHARED ${sceneSources})
|
||||
add_library(SimGearScene SHARED ${sceneSources})
|
||||
# set_property(TARGET SimGearScene PROPERTY FRAMEWORK 1)
|
||||
# set_property(TARGET SimGearScene PROPERTY PUBLIC_HEADER "${publicHeaders}")
|
||||
set_property(TARGET SimGearScene PROPERTY LINKER_LANGUAGE CXX)
|
||||
|
||||
target_link_libraries(SimGearScene ${ZLIB_LIBRARY}
|
||||
${OPENSCENEGRAPH_LIBRARIES}
|
||||
${OPENAL_LIBRARY} ${ALUT_LIBRARY}
|
||||
${OPENGL_LIBRARY})
|
||||
|
||||
install(TARGETS SimGearScene LIBRARY DESTINATION lib${LIB_SUFFIX})
|
||||
target_link_libraries(SimGearScene
|
||||
SimGearCore
|
||||
${ZLIB_LIBRARY}
|
||||
${OPENSCENEGRAPH_LIBRARIES}
|
||||
${OPENAL_LIBRARY} ${ALUT_LIBRARY}
|
||||
${OPENGL_LIBRARY})
|
||||
|
||||
if(LIBSVN_FOUND)
|
||||
target_link_libraries(SimGearScene ${LIBSVN_LIBRARIES})
|
||||
endif(LIBSVN_FOUND)
|
||||
|
||||
install(TARGETS SimGearScene LIBRARY DESTINATION lib${LIB_SUFFIX})
|
||||
endif()
|
||||
|
||||
endif(SIMGEAR_SHARED)
|
||||
|
@ -37,43 +37,34 @@ set(SOURCES
|
||||
simgear_component(io io "${SOURCES}" "${HEADERS}")
|
||||
|
||||
if(ENABLE_TESTS)
|
||||
|
||||
if (SIMGEAR_SHARED)
|
||||
set(TEST_LIBS SimGearCore)
|
||||
else()
|
||||
set(TEST_LIBS
|
||||
sgio sgbucket sgstructure sgthreads sgtiming sgmisc sgdebug
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${WINSOCK_LIBRARY}
|
||||
${ZLIB_LIBRARY}
|
||||
${RT_LIBRARY})
|
||||
endif()
|
||||
|
||||
add_executable(test_sock socktest.cxx)
|
||||
target_link_libraries(test_sock sgio sgstructure sgthreads sgdebug
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${WINSOCK_LIBRARY}
|
||||
${RT_LIBRARY})
|
||||
target_link_libraries(test_sock ${TEST_LIBS})
|
||||
|
||||
add_executable(test_http test_HTTP.cxx)
|
||||
target_link_libraries(test_http
|
||||
sgio sgstructure sgthreads sgtiming sgmisc sgdebug
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${WINSOCK_LIBRARY}
|
||||
${RT_LIBRARY})
|
||||
target_link_libraries(test_http ${TEST_LIBS})
|
||||
|
||||
add_test(http ${EXECUTABLE_OUTPUT_PATH}/test_http)
|
||||
|
||||
add_executable(httpget httpget.cxx)
|
||||
target_link_libraries(httpget
|
||||
sgio sgstructure sgthreads sgtiming sgmisc sgdebug
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${WINSOCK_LIBRARY}
|
||||
${RT_LIBRARY})
|
||||
target_link_libraries(httpget ${TEST_LIBS})
|
||||
|
||||
add_executable(decode_binobj decode_binobj.cxx)
|
||||
target_link_libraries(decode_binobj
|
||||
sgio sgbucket sgstructure sgthreads sgtiming sgmisc sgdebug
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${WINSOCK_LIBRARY}
|
||||
${ZLIB_LIBRARY}
|
||||
${RT_LIBRARY})
|
||||
target_link_libraries(decode_binobj ${TEST_LIBS})
|
||||
|
||||
add_executable(test_binobj test_binobj.cxx)
|
||||
target_link_libraries(test_binobj
|
||||
sgio sgbucket sgstructure sgthreads sgtiming sgmisc sgdebug
|
||||
${CMAKE_THREAD_LIBS_INIT}
|
||||
${WINSOCK_LIBRARY}
|
||||
${ZLIB_LIBRARY}
|
||||
${RT_LIBRARY})
|
||||
target_link_libraries(test_binobj ${TEST_LIBS})
|
||||
|
||||
add_test(binobj ${EXECUTABLE_OUTPUT_PATH}/test_binobj)
|
||||
endif(ENABLE_TESTS)
|
||||
|
Loading…
Reference in New Issue
Block a user