]> git.mxchange.org Git - flightgear.git/commitdiff
Cmake: add more utilities to the build system
authorFrederic Bouvier <fredfgfs01@free.fr>
Wed, 5 Jan 2011 16:19:42 +0000 (17:19 +0100)
committerFrederic Bouvier <fredfgfs01@free.fr>
Wed, 5 Jan 2011 16:19:42 +0000 (17:19 +0100)
CMakeLists.txt
utils/CMakeLists.txt
utils/GPSsmooth/CMakeLists.txt [new file with mode: 0644]

index ef8b6ade3511286fc5413f7a582f4f196fde4a3d..b8085c7720664b05101905d02e627177bb1760f4 100644 (file)
@@ -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")
index f7fad8a71afc07de9ea5ebe4f80c92b1261008c7..bcf0fcbc0bf6f604d6a679389c10bbe5f1dd4034 100644 (file)
@@ -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 (file)
index 0000000..78bc778
--- /dev/null
@@ -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)