From 402982f90159c2fbca31388b9fa7a5f085c89009 Mon Sep 17 00:00:00 2001 From: Frederic Bouvier Date: Wed, 5 Jan 2011 17:19:42 +0100 Subject: [PATCH] Cmake: add more utilities to the build system --- CMakeLists.txt | 7 +++++ utils/CMakeLists.txt | 2 +- utils/GPSsmooth/CMakeLists.txt | 48 ++++++++++++++++++++++++++++++++++ 3 files changed, 56 insertions(+), 1 deletion(-) create mode 100644 utils/GPSsmooth/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index ef8b6ade3..b8085c772 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -8,6 +8,11 @@ include (CPack) project(FlightGear) +set(CMAKE_DEBUG_POSTFIX "d" CACHE STRING "add a postfix, usually d on windows") +set(CMAKE_RELEASE_POSTFIX "" CACHE STRING "add a postfix, usually empty on windows") +set(CMAKE_RELWITHDEBINFO_POSTFIX "rd" CACHE STRING "add a postfix, usually empty on windows") +set(CMAKE_MINSIZEREL_POSTFIX "s" CACHE STRING "add a postfix, usually empty on windows") + # read 'version' file into a variable (stripping any newlines or spaces) file(READ version versionFile) string(STRIP ${versionFile} FLIGHTGEAR_VERSION) @@ -93,6 +98,7 @@ find_package(OpenGL REQUIRED) find_package(OpenAL REQUIRED) find_package(ALUT REQUIRED) find_package(OpenSceneGraph 2.8.2 REQUIRED osgText osgSim osgDB osgParticle osgFX osgUtil osgViewer osgGA) +find_package(FLTK) find_package(PLIB REQUIRED puaux pu js fnt) find_package(SimGear 2.0.0 REQUIRED) @@ -157,6 +163,7 @@ if(WIN32) endif(MSVC) set(NOMINMAX 1) + set( WINSOCK_LIBRARY "ws2_32.lib" ) endif(WIN32) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS} -D_REENTRANT") diff --git a/utils/CMakeLists.txt b/utils/CMakeLists.txt index f7fad8a71..bcf0fcbc0 100644 --- a/utils/CMakeLists.txt +++ b/utils/CMakeLists.txt @@ -1,3 +1,3 @@ add_subdirectory(TerraSync) add_subdirectory(fgviewer) - +add_subdirectory(GPSsmooth) diff --git a/utils/GPSsmooth/CMakeLists.txt b/utils/GPSsmooth/CMakeLists.txt new file mode 100644 index 000000000..78bc778ef --- /dev/null +++ b/utils/GPSsmooth/CMakeLists.txt @@ -0,0 +1,48 @@ + +add_executable(GPSsmooth gps.cxx gps_main.cxx) +add_executable(MIDGsmooth MIDG-II.cxx MIDG_main.cxx) +add_executable(UGsmooth UGear.cxx UGear_command.cxx UGear_main.cxx UGear_telnet.cxx) + +target_link_libraries(GPSsmooth + ${SIMGEAR_DEBUG_LIBRARY} + ${SIMGEAR_IO_LIBRARY} + ${SIMGEAR_MISC_LIBRARY} + ${SIMGEAR_STRUCTURE_LIBRARY} + ${SIMGEAR_TIMING_LIBRARY} + ${PLIB_SG_LIBRARY} + ${PLIB_UL_LIBRARY} + ${ZLIB_LIBRARIES} + ${WINMM_LIBRARY} + ${WINSOCK_LIBRARY} + ${ZLIB_LIBRARIES} +) + +target_link_libraries(MIDGsmooth + ${SIMGEAR_DEBUG_LIBRARY} + ${SIMGEAR_IO_LIBRARY} + ${SIMGEAR_MATH_LIBRARY} + ${SIMGEAR_SERIAL_LIBRARY} + ${SIMGEAR_STRUCTURE_LIBRARY} + ${SIMGEAR_TIMING_LIBRARY} + ${PLIB_SG_LIBRARY} + ${PLIB_UL_LIBRARY} + ${WINMM_LIBRARY} + ${WINSOCK_LIBRARY} +) + +target_link_libraries(UGsmooth + ${SIMGEAR_DEBUG_LIBRARY} + ${SIMGEAR_IO_LIBRARY} + ${SIMGEAR_MATH_LIBRARY} + ${SIMGEAR_MISC_LIBRARY} + ${SIMGEAR_SERIAL_LIBRARY} + ${SIMGEAR_STRUCTURE_LIBRARY} + ${SIMGEAR_TIMING_LIBRARY} + ${PLIB_SG_LIBRARY} + ${PLIB_UL_LIBRARY} + ${WINMM_LIBRARY} + ${WINSOCK_LIBRARY} + ${ZLIB_LIBRARIES} +) + +install(TARGETS GPSsmooth MIDGsmooth UGsmooth RUNTIME DESTINATION bin) -- 2.39.5