1 # 20130904 - build of fgcom standalone - geoff
2 # set data installed location
3 set(PKGDATAPATH "${CMAKE_INSTALL_PREFIX}/share/flightgear")
6 set( RESOURCE_FILE fgcom.rc )
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")
14 if (NOT SPECIAL_FREQUENCIES_FILE)
15 set(SPECIAL_FREQUENCIES_FILE "../share/flightgear/special_frequencies.txt")
17 # pass these to the compiler
18 add_definitions( -DDEFAULT_POSITIONS_FILE="${DEFAULT_POSITIONS_FILE}" )
19 add_definitions( -DSPECIAL_FREQUENCIES_FILE="${SPECIAL_FREQUENCIES_FILE}" )
21 # Project fgcom, type Console Application
23 set( ${name}_SOURCES fgcom.cxx fgcom_init.cxx position.cxx utils.cxx ${RESOURCE_FILE} )
24 set( ${name}_HEADERS fgcom.hxx fgcom_init.hxx position.hxx utils.hxx )
26 list(APPEND ${name}_SOURCES fgcom_getopt.c)
27 list(APPEND ${name}_HEADERS fgcom_getopt.h)
29 add_executable( ${name} ${${name}_SOURCES} ${${name}_HEADERS} )
31 set_target_properties( ${name} PROPERTIES DEBUG_POSTFIX d )
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}
39 ${SIMGEAR_CORE_LIBRARIES}
40 ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES} )
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})