]> git.mxchange.org Git - flightgear.git/blob - utils/fgcom/CMakeLists.txt
ATC/Traffic doesn’t crash reset.
[flightgear.git] / utils / fgcom / CMakeLists.txt
1 set(name fgcom)
2
3 # Copy positions.txt content in const char* _positionsData[];
4 file(READ utils/positions.txt POSITIONS_DATA)
5 string(REGEX REPLACE "\n" "\"%
6     \"" POSITIONS_DATA ${POSITIONS_DATA})
7 string(REGEX REPLACE "%" "," POSITIONS_DATA ${POSITIONS_DATA})
8 file(WRITE positions.hxx "const char* _positionsData[] = {
9     \"")
10 file(APPEND positions.hxx ${POSITIONS_DATA})
11 file(APPEND positions.hxx "\"
12 };")
13
14 if(MSVC)
15   set(RESOURCE_FILE fgcom.rc)
16 endif(MSVC)
17
18 set(SOURCES fgcom.cxx)
19 set(HEADERS fgcom.hxx positions.hxx)
20
21 add_executable(${name}
22   ${SOURCES}
23   ${HEADERS}
24   ${RESOURCE_FILE}
25 )
26
27 target_link_Libraries(${name}
28                       iaxclient_lib
29                       ${OPENAL_LIBRARY}
30                       ${SIMGEAR_CORE_LIBRARIES}
31                       ${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
32 )
33
34 install(TARGETS ${name} RUNTIME DESTINATION bin)