1
0
Fork 0

Cmake: add more utilities to the build system

This commit is contained in:
Frederic Bouvier 2011-01-05 17:19:42 +01:00
parent 65301bf84e
commit 402982f901
3 changed files with 56 additions and 1 deletions

View file

@ -8,6 +8,11 @@ include (CPack)
project(FlightGear) 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) # read 'version' file into a variable (stripping any newlines or spaces)
file(READ version versionFile) file(READ version versionFile)
string(STRIP ${versionFile} FLIGHTGEAR_VERSION) string(STRIP ${versionFile} FLIGHTGEAR_VERSION)
@ -93,6 +98,7 @@ find_package(OpenGL REQUIRED)
find_package(OpenAL REQUIRED) find_package(OpenAL REQUIRED)
find_package(ALUT REQUIRED) find_package(ALUT REQUIRED)
find_package(OpenSceneGraph 2.8.2 REQUIRED osgText osgSim osgDB osgParticle osgFX osgUtil osgViewer osgGA) 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(PLIB REQUIRED puaux pu js fnt)
find_package(SimGear 2.0.0 REQUIRED) find_package(SimGear 2.0.0 REQUIRED)
@ -157,6 +163,7 @@ if(WIN32)
endif(MSVC) endif(MSVC)
set(NOMINMAX 1) set(NOMINMAX 1)
set( WINSOCK_LIBRARY "ws2_32.lib" )
endif(WIN32) endif(WIN32)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS} -D_REENTRANT") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS} -D_REENTRANT")

View file

@ -1,3 +1,3 @@
add_subdirectory(TerraSync) add_subdirectory(TerraSync)
add_subdirectory(fgviewer) add_subdirectory(fgviewer)
add_subdirectory(GPSsmooth)

View file

@ -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)