2014-08-19 18:46:42 +00:00
|
|
|
set(name fgcom)
|
2013-09-27 14:05:45 +00:00
|
|
|
|
2014-08-19 18:46:42 +00:00
|
|
|
# Copy positions.txt content in const char* _positionsData[];
|
|
|
|
file(READ utils/positions.txt POSITIONS_DATA)
|
|
|
|
string(REGEX REPLACE "\n" "\"%
|
|
|
|
\"" POSITIONS_DATA ${POSITIONS_DATA})
|
|
|
|
string(REGEX REPLACE "%" "," POSITIONS_DATA ${POSITIONS_DATA})
|
|
|
|
file(WRITE positions.hxx "const char* _positionsData[] = {
|
|
|
|
\"")
|
|
|
|
file(APPEND positions.hxx ${POSITIONS_DATA})
|
|
|
|
file(APPEND positions.hxx "\"
|
|
|
|
};")
|
2013-10-31 13:07:31 +00:00
|
|
|
|
2014-08-19 18:46:42 +00:00
|
|
|
if(MSVC)
|
|
|
|
set(RESOURCE_FILE fgcom.rc)
|
|
|
|
endif(MSVC)
|
2013-11-27 12:48:14 +00:00
|
|
|
|
2014-08-19 18:46:42 +00:00
|
|
|
set(SOURCES fgcom.cxx)
|
|
|
|
set(HEADERS fgcom.hxx positions.hxx)
|
2013-09-27 14:05:45 +00:00
|
|
|
|
2014-08-19 18:46:42 +00:00
|
|
|
add_executable(${name}
|
|
|
|
${SOURCES}
|
|
|
|
${HEADERS}
|
|
|
|
${RESOURCE_FILE}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_Libraries(${name}
|
|
|
|
iaxclient_lib
|
|
|
|
${OPENAL_LIBRARY}
|
|
|
|
${SIMGEAR_CORE_LIBRARIES}
|
|
|
|
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
|
|
|
)
|
|
|
|
|
2016-07-09 21:14:28 +00:00
|
|
|
install(TARGETS ${name} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|