2010-11-30 10:08:30 +00:00
|
|
|
|
2011-01-28 18:30:27 +00:00
|
|
|
if (MSVC)
|
2011-01-28 18:34:49 +00:00
|
|
|
if (CMAKE_CL_64)
|
|
|
|
set( RESOURCE_FILE flightgear64.rc )
|
|
|
|
else (CMAKE_CL_64)
|
|
|
|
set( RESOURCE_FILE flightgear.rc )
|
|
|
|
endif (CMAKE_CL_64)
|
2011-01-28 18:30:27 +00:00
|
|
|
endif (MSVC)
|
|
|
|
|
2010-11-30 10:08:30 +00:00
|
|
|
set(SOURCES
|
|
|
|
bootstrap.cxx
|
|
|
|
fg_commands.cxx
|
|
|
|
fg_init.cxx
|
|
|
|
fg_io.cxx
|
|
|
|
fg_os_common.cxx
|
|
|
|
fg_props.cxx
|
|
|
|
globals.cxx
|
2012-04-21 18:17:42 +00:00
|
|
|
locale.cxx
|
2010-11-30 10:08:30 +00:00
|
|
|
logger.cxx
|
|
|
|
main.cxx
|
|
|
|
options.cxx
|
|
|
|
util.cxx
|
2011-01-28 18:30:27 +00:00
|
|
|
${RESOURCE_FILE}
|
2010-11-30 10:08:30 +00:00
|
|
|
)
|
2011-06-26 06:49:37 +00:00
|
|
|
|
|
|
|
set(HEADERS
|
|
|
|
fg_commands.hxx
|
|
|
|
fg_init.hxx
|
|
|
|
fg_io.hxx
|
|
|
|
fg_props.hxx
|
|
|
|
globals.hxx
|
2012-04-21 18:17:42 +00:00
|
|
|
locale.hxx
|
2011-06-26 06:49:37 +00:00
|
|
|
logger.hxx
|
|
|
|
main.hxx
|
|
|
|
options.hxx
|
|
|
|
util.hxx
|
|
|
|
)
|
|
|
|
|
2012-03-26 12:09:39 +00:00
|
|
|
get_property(FG_SOURCES GLOBAL PROPERTY FG_SOURCES)
|
|
|
|
get_property(FG_HEADERS GLOBAL PROPERTY FG_HEADERS)
|
|
|
|
|
2012-04-19 18:31:53 +00:00
|
|
|
link_directories ( ${Boost_LIBRARY_DIRS} )
|
|
|
|
|
2012-09-16 17:26:12 +00:00
|
|
|
get_property(FG_GROUPS_C GLOBAL PROPERTY FG_GROUPS_C)
|
|
|
|
string(REPLACE "@" ";" groups ${FG_GROUPS_C} )
|
|
|
|
foreach(g ${groups})
|
|
|
|
string(REPLACE "#" ";" g2 ${g})
|
|
|
|
list(GET g2 0 name)
|
|
|
|
list(REMOVE_AT g2 0)
|
|
|
|
source_group("${name}\\Sources" FILES ${g2})
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
get_property(FG_GROUPS_H GLOBAL PROPERTY FG_GROUPS_H)
|
|
|
|
string(REPLACE "@" ";" groups ${FG_GROUPS_H} )
|
|
|
|
foreach(g ${groups})
|
|
|
|
string(REPLACE "#" ";" g2 ${g})
|
|
|
|
list(GET g2 0 name)
|
|
|
|
list(REMOVE_AT g2 0)
|
|
|
|
source_group("${name}\\Headers" FILES ${g2})
|
|
|
|
endforeach()
|
|
|
|
|
|
|
|
source_group("Main\\Headers" FILES ${HEADERS})
|
|
|
|
source_group("Main\\Sources" FILES ${SOURCES})
|
2012-03-26 12:09:39 +00:00
|
|
|
add_executable(fgfs ${SOURCES} ${FG_SOURCES} ${FG_HEADERS} ${HEADERS})
|
2010-11-30 10:08:30 +00:00
|
|
|
|
|
|
|
get_property(FG_LIBS GLOBAL PROPERTY FG_LIBS)
|
|
|
|
#message(STATUS "fg libs ${FG_LIBS}")
|
|
|
|
#message(STATUS "OSG libs ${OPENSCENEGRAPH_LIBRARIES}")
|
|
|
|
#message(STATUS "SG libs ${SIMGEAR_LIBRARIES}")
|
|
|
|
|
2010-12-26 12:55:52 +00:00
|
|
|
if(RTI_FOUND)
|
2011-12-04 13:37:25 +00:00
|
|
|
set(HLA_LIBRARIES ${RTI_LIBRARIES})
|
2010-12-26 12:55:52 +00:00
|
|
|
else()
|
2011-12-04 13:37:25 +00:00
|
|
|
set(HLA_LIBRARIES "")
|
2010-12-26 12:55:52 +00:00
|
|
|
endif()
|
|
|
|
|
2012-03-26 12:09:39 +00:00
|
|
|
if(ENABLE_JSBSIM)
|
|
|
|
# FIXME - remove once JSBSim doesn't expose private headers
|
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/src/FDM/JSBSim)
|
|
|
|
|
|
|
|
target_link_libraries(fgfs JSBSim)
|
|
|
|
endif()
|
|
|
|
|
2012-06-06 22:11:10 +00:00
|
|
|
include_directories(${PROJECT_SOURCE_DIR}/src/Canvas/ShivaVG/include)
|
|
|
|
add_definitions(-DVG_API_EXPORT)
|
|
|
|
|
2011-08-30 19:51:53 +00:00
|
|
|
target_link_libraries(fgfs
|
2010-11-30 10:08:30 +00:00
|
|
|
${SIMGEAR_LIBRARIES}
|
2011-08-30 19:51:53 +00:00
|
|
|
${OPENSCENEGRAPH_LIBRARIES}
|
2010-11-30 10:08:30 +00:00
|
|
|
${OPENGL_LIBRARIES}
|
2010-12-25 23:44:02 +00:00
|
|
|
${PLIB_LIBRARIES}
|
2011-11-05 13:17:08 +00:00
|
|
|
${JPEG_LIBRARY}
|
2011-09-11 09:22:10 +00:00
|
|
|
${HLA_LIBRARIES}
|
2011-12-04 13:37:25 +00:00
|
|
|
${EVENT_INPUT_LIBRARIES}
|
2011-09-11 09:22:10 +00:00
|
|
|
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
2011-11-29 10:24:33 +00:00
|
|
|
${SIMGEAR_SCENE_LIBRARY_DEPENDENCIES}
|
2011-10-16 18:55:04 +00:00
|
|
|
${PLATFORM_LIBS}
|
2012-06-06 09:32:02 +00:00
|
|
|
ShivaVG
|
2011-09-11 09:22:10 +00:00
|
|
|
)
|
2011-08-30 19:51:53 +00:00
|
|
|
|
2010-11-30 10:08:30 +00:00
|
|
|
install(TARGETS fgfs RUNTIME DESTINATION bin)
|
2011-10-21 11:48:42 +00:00
|
|
|
|
|
|
|
add_executable(metar metar_main.cxx)
|
2012-02-24 21:23:15 +00:00
|
|
|
|
2011-10-21 11:48:42 +00:00
|
|
|
target_link_libraries(metar
|
|
|
|
${SIMGEAR_LIBRARIES}
|
|
|
|
${SIMGEAR_CORE_LIBRARY_DEPENDENCIES}
|
2011-11-30 20:45:22 +00:00
|
|
|
${SIMGEAR_SCENE_LIBRARY_DEPENDENCIES}
|
2011-10-21 11:48:42 +00:00
|
|
|
${PLATFORM_LIBS}
|
|
|
|
)
|
|
|
|
|
|
|
|
install(TARGETS metar RUNTIME DESTINATION bin)
|