Fix state-machine test linkage with static libs.

Thanks to Thomas for the catch.
This commit is contained in:
James Turner 2013-01-22 20:56:57 +01:00
parent 47b02c0480
commit 5b92575ed3

View File

@ -44,8 +44,17 @@ set(SOURCES
simgear_component(structure structure "${SOURCES}" "${HEADERS}")
if(ENABLE_TESTS)
if (SIMGEAR_SHARED)
set(TEST_LIBS SimGearCore)
else()
set(TEST_LIBS SimGearCore ${CMAKE_THREAD_LIBS_INIT}
${ZLIB_LIBRARY}
${RT_LIBRARY})
endif()
add_executable(test_state_machine state_machine_test.cxx)
target_link_libraries(test_state_machine SimGearCore)
target_link_libraries(test_state_machine ${TEST_LIBS})
add_test(test_state_machine ${EXECUTABLE_OUTPUT_PATH}/test_state_machine)
endif(ENABLE_TESTS)