]> git.mxchange.org Git - flightgear.git/blob - utils/fgcom/CMakeLists.txt
Add an FGCom icon from fgcomgui (under GPL)
[flightgear.git] / utils / fgcom / CMakeLists.txt
1 # 20130904 - build of fgcom standalone - geoff
2     # set data installed location
3     set(PKGDATAPATH "${CMAKE_INSTALL_PREFIX}/share/flightgear")
4
5     if (MSVC)
6       set( RESOURCE_FILE fgcom.rc )
7     endif (MSVC)
8
9     # then to define the files themselves, in their 'installed' 
10     # location, not their source location...
11     if (NOT DEFAULT_POSITIONS_FILE)
12       set(DEFAULT_POSITIONS_FILE "../share/flightgear/positions.txt")
13     endif ()
14     if (NOT SPECIAL_FREQUENCIES_FILE)
15       set(SPECIAL_FREQUENCIES_FILE "../share/flightgear/special_frequencies.txt")
16     endif ()
17     # pass these to the compiler
18     add_definitions( -DDEFAULT_POSITIONS_FILE="${DEFAULT_POSITIONS_FILE}" )
19     add_definitions( -DSPECIAL_FREQUENCIES_FILE="${SPECIAL_FREQUENCIES_FILE}" )
20
21     # Project fgcom, type Console Application
22     set(name fgcom)
23     set( ${name}_SOURCES fgcom.cxx fgcom_init.cxx position.cxx utils.cxx )
24     set( ${name}_HEADERS fgcom.hxx fgcom_init.hxx position.hxx utils.hxx )
25     if(WIN32)
26         list(APPEND ${name}_SOURCES fgcom_getopt.c)
27         list(APPEND ${name}_HEADERS fgcom_getopt.h)
28     endif()
29     add_executable( ${name} ${${name}_SOURCES} ${${name}_HEADERS} )
30     if(WIN32)
31         set_target_properties( ${name} PROPERTIES DEBUG_POSTFIX d )
32     endif()
33     target_link_libraries( ${name} iaxclient_lib )
34     # this could be just on a target basis, but for now
35     include_directories( ${CMAKE_SOURCE_DIR}/3rdparty/iaxclient/lib ) # for iaxclient.h
36     # Now include simgear libraries 
37     target_link_Libraries( ${name}
38         ${OPENAL_LIBRARY}
39         ${SIMGEAR_CORE_LIBRARIES}
40         ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} )
41     # deal with install
42     install(TARGETS ${name} RUNTIME DESTINATION bin)
43     # then install, from their source to install destination
44     set( inst_FILES utils/positions.txt
45         utils/special_frequencies.txt )
46     install(FILES ${inst_FILES} DESTINATION ${PKGDATAPATH})
47 # eof