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,14 +45,17 @@ if(SIMGEAR_SHARED)
|
|||||||
get_property(sceneSources GLOBAL PROPERTY SCENE_SOURCES)
|
get_property(sceneSources GLOBAL PROPERTY SCENE_SOURCES)
|
||||||
get_property(publicHeaders GLOBAL PROPERTY PUBLIC_HEADERS)
|
get_property(publicHeaders GLOBAL PROPERTY PUBLIC_HEADERS)
|
||||||
|
|
||||||
add_library(SimGear SHARED ${coreSources})
|
add_library(SimGearCore SHARED ${coreSources})
|
||||||
# set_property(TARGET SimGear PROPERTY FRAMEWORK 1)
|
set_property(TARGET SimGearCore PROPERTY COMPILE_FLAGS "-DNO_OPENSCENEGRAPH_INTERFACE=1")
|
||||||
# message(STATUS "public header: ${publicHeaders}")
|
|
||||||
set_property(TARGET SimGear PROPERTY PUBLIC_HEADER "${publicHeaders}")
|
|
||||||
set_property(TARGET SimGear PROPERTY LINKER_LANGUAGE CXX)
|
|
||||||
|
|
||||||
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)
|
PUBLIC_HEADER DESTINATION include/simgear)
|
||||||
|
|
||||||
if(NOT SIMGEAR_HEADLESS)
|
if(NOT SIMGEAR_HEADLESS)
|
||||||
@ -66,16 +69,23 @@ if(SIMGEAR_SHARED)
|
|||||||
ENDIF(APPLE)
|
ENDIF(APPLE)
|
||||||
endif(LIBSVN_FOUND)
|
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 FRAMEWORK 1)
|
||||||
# set_property(TARGET SimGearScene PROPERTY PUBLIC_HEADER "${publicHeaders}")
|
# set_property(TARGET SimGearScene PROPERTY PUBLIC_HEADER "${publicHeaders}")
|
||||||
set_property(TARGET SimGearScene PROPERTY LINKER_LANGUAGE CXX)
|
set_property(TARGET SimGearScene PROPERTY LINKER_LANGUAGE CXX)
|
||||||
|
|
||||||
target_link_libraries(SimGearScene ${ZLIB_LIBRARY}
|
target_link_libraries(SimGearScene
|
||||||
|
SimGearCore
|
||||||
|
${ZLIB_LIBRARY}
|
||||||
${OPENSCENEGRAPH_LIBRARIES}
|
${OPENSCENEGRAPH_LIBRARIES}
|
||||||
${OPENAL_LIBRARY} ${ALUT_LIBRARY}
|
${OPENAL_LIBRARY} ${ALUT_LIBRARY}
|
||||||
${OPENGL_LIBRARY})
|
${OPENGL_LIBRARY})
|
||||||
|
|
||||||
|
if(LIBSVN_FOUND)
|
||||||
|
target_link_libraries(SimGearScene ${LIBSVN_LIBRARIES})
|
||||||
|
endif(LIBSVN_FOUND)
|
||||||
|
|
||||||
install(TARGETS SimGearScene LIBRARY DESTINATION lib${LIB_SUFFIX})
|
install(TARGETS SimGearScene LIBRARY DESTINATION lib${LIB_SUFFIX})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -37,43 +37,34 @@ set(SOURCES
|
|||||||
simgear_component(io io "${SOURCES}" "${HEADERS}")
|
simgear_component(io io "${SOURCES}" "${HEADERS}")
|
||||||
|
|
||||||
if(ENABLE_TESTS)
|
if(ENABLE_TESTS)
|
||||||
add_executable(test_sock socktest.cxx)
|
|
||||||
target_link_libraries(test_sock sgio sgstructure sgthreads sgdebug
|
if (SIMGEAR_SHARED)
|
||||||
|
set(TEST_LIBS SimGearCore)
|
||||||
|
else()
|
||||||
|
set(TEST_LIBS
|
||||||
|
sgio sgbucket sgstructure sgthreads sgtiming sgmisc sgdebug
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
${CMAKE_THREAD_LIBS_INIT}
|
||||||
${WINSOCK_LIBRARY}
|
${WINSOCK_LIBRARY}
|
||||||
|
${ZLIB_LIBRARY}
|
||||||
${RT_LIBRARY})
|
${RT_LIBRARY})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_executable(test_sock socktest.cxx)
|
||||||
|
target_link_libraries(test_sock ${TEST_LIBS})
|
||||||
|
|
||||||
add_executable(test_http test_HTTP.cxx)
|
add_executable(test_http test_HTTP.cxx)
|
||||||
target_link_libraries(test_http
|
target_link_libraries(test_http ${TEST_LIBS})
|
||||||
sgio sgstructure sgthreads sgtiming sgmisc sgdebug
|
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
${WINSOCK_LIBRARY}
|
|
||||||
${RT_LIBRARY})
|
|
||||||
|
|
||||||
add_test(http ${EXECUTABLE_OUTPUT_PATH}/test_http)
|
add_test(http ${EXECUTABLE_OUTPUT_PATH}/test_http)
|
||||||
|
|
||||||
add_executable(httpget httpget.cxx)
|
add_executable(httpget httpget.cxx)
|
||||||
target_link_libraries(httpget
|
target_link_libraries(httpget ${TEST_LIBS})
|
||||||
sgio sgstructure sgthreads sgtiming sgmisc sgdebug
|
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
${WINSOCK_LIBRARY}
|
|
||||||
${RT_LIBRARY})
|
|
||||||
|
|
||||||
add_executable(decode_binobj decode_binobj.cxx)
|
add_executable(decode_binobj decode_binobj.cxx)
|
||||||
target_link_libraries(decode_binobj
|
target_link_libraries(decode_binobj ${TEST_LIBS})
|
||||||
sgio sgbucket sgstructure sgthreads sgtiming sgmisc sgdebug
|
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
${WINSOCK_LIBRARY}
|
|
||||||
${ZLIB_LIBRARY}
|
|
||||||
${RT_LIBRARY})
|
|
||||||
|
|
||||||
add_executable(test_binobj test_binobj.cxx)
|
add_executable(test_binobj test_binobj.cxx)
|
||||||
target_link_libraries(test_binobj
|
target_link_libraries(test_binobj ${TEST_LIBS})
|
||||||
sgio sgbucket sgstructure sgthreads sgtiming sgmisc sgdebug
|
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
${WINSOCK_LIBRARY}
|
|
||||||
${ZLIB_LIBRARY}
|
|
||||||
${RT_LIBRARY})
|
|
||||||
|
|
||||||
add_test(binobj ${EXECUTABLE_OUTPUT_PATH}/test_binobj)
|
add_test(binobj ${EXECUTABLE_OUTPUT_PATH}/test_binobj)
|
||||||
endif(ENABLE_TESTS)
|
endif(ENABLE_TESTS)
|
||||||
|
Loading…
Reference in New Issue
Block a user