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(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)
|
||||||
if(LIBSVN_FOUND)
|
if(LIBSVN_FOUND)
|
||||||
add_definitions(${APR_CFLAGS})
|
add_definitions(${APR_CFLAGS})
|
||||||
|
|
||||||
IF(APPLE)
|
IF(APPLE)
|
||||||
set_property(SOURCE scene/tsync/terrasync.cxx PROPERTY COMPILE_FLAGS "-iwithsysroot ${LIBSVN_INCLUDE_DIR}")
|
set_property(SOURCE scene/tsync/terrasync.cxx PROPERTY COMPILE_FLAGS "-iwithsysroot ${LIBSVN_INCLUDE_DIR}")
|
||||||
ELSE()
|
ELSE()
|
||||||
include_directories(${LIBSVN_INCLUDE_DIR})
|
include_directories(${LIBSVN_INCLUDE_DIR})
|
||||||
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
|
||||||
${OPENSCENEGRAPH_LIBRARIES}
|
SimGearCore
|
||||||
${OPENAL_LIBRARY} ${ALUT_LIBRARY}
|
${ZLIB_LIBRARY}
|
||||||
${OPENGL_LIBRARY})
|
${OPENSCENEGRAPH_LIBRARIES}
|
||||||
|
${OPENAL_LIBRARY} ${ALUT_LIBRARY}
|
||||||
|
${OPENGL_LIBRARY})
|
||||||
|
|
||||||
install(TARGETS SimGearScene LIBRARY DESTINATION lib${LIB_SUFFIX})
|
if(LIBSVN_FOUND)
|
||||||
|
target_link_libraries(SimGearScene ${LIBSVN_LIBRARIES})
|
||||||
|
endif(LIBSVN_FOUND)
|
||||||
|
|
||||||
|
install(TARGETS SimGearScene LIBRARY DESTINATION lib${LIB_SUFFIX})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
endif(SIMGEAR_SHARED)
|
endif(SIMGEAR_SHARED)
|
||||||
|
@ -37,43 +37,34 @@ set(SOURCES
|
|||||||
simgear_component(io io "${SOURCES}" "${HEADERS}")
|
simgear_component(io io "${SOURCES}" "${HEADERS}")
|
||||||
|
|
||||||
if(ENABLE_TESTS)
|
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)
|
add_executable(test_sock socktest.cxx)
|
||||||
target_link_libraries(test_sock sgio sgstructure sgthreads sgdebug
|
target_link_libraries(test_sock ${TEST_LIBS})
|
||||||
${CMAKE_THREAD_LIBS_INIT}
|
|
||||||
${WINSOCK_LIBRARY}
|
|
||||||
${RT_LIBRARY})
|
|
||||||
|
|
||||||
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