Add the hla stuff to the cmake build system.
This commit is contained in:
parent
70dd6279a7
commit
3134acca83
5 changed files with 35 additions and 8 deletions
|
@ -72,9 +72,9 @@ endif()
|
|||
if(EVENT_INPUT)
|
||||
message(STATUS "checking event-based Input")
|
||||
IF(APPLE)
|
||||
|
||||
|
||||
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
|
||||
|
||||
|
||||
else()
|
||||
message(WARNING "event input is not supported on this platform yet")
|
||||
endif()
|
||||
|
@ -163,6 +163,11 @@ endif(HAVE_RT)
|
|||
endif(NOT CLOCK_GETTIME_IN_LIBC)
|
||||
endif(HAVE_CLOCK_GETTIME)
|
||||
|
||||
find_package(RTI)
|
||||
if(RTI_FOUND)
|
||||
set(FG_HAVE_HLA 1)
|
||||
endif()
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUCXX)
|
||||
set(WARNING_FLAGS -Wall)
|
||||
endif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
|
@ -185,9 +190,9 @@ endif(WIN32)
|
|||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS} -D_REENTRANT")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS} -D_REENTRANT")
|
||||
|
||||
include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}
|
||||
${Boost_INCLUDE_DIRS}
|
||||
${ZLIB_INCLUDE_DIR}
|
||||
${ALUT_INCLUDE_DIR}
|
||||
${OPENAL_INCLUDE_DIR}
|
||||
${SIMGEAR_INCLUDE_DIR}
|
||||
|
|
|
@ -4,17 +4,17 @@
|
|||
#cmakedefine ENABLE_SP_FDM
|
||||
|
||||
// JSBSim needs this, to switch from standalone to in-FG mode
|
||||
#define FGFS
|
||||
#define FGFS
|
||||
|
||||
#define PU_USE_NONE // PLIB needs this to avoid linking to GLUT
|
||||
|
||||
#cmakedefine ENABLE_PLIB_JOYSTICK
|
||||
|
||||
// threads are required (used to be optional)
|
||||
#define ENABLE_THREADS 1
|
||||
#define ENABLE_THREADS 1
|
||||
|
||||
// audio support is assumed
|
||||
#define ENABLE_AUDIO_SUPPORT 1
|
||||
#define ENABLE_AUDIO_SUPPORT 1
|
||||
|
||||
#cmakedefine HAVE_SYS_TIME_H
|
||||
#cmakedefine HAVE_WINDOWS_H
|
||||
|
@ -33,3 +33,5 @@
|
|||
#cmakedefine HAVE_LIBSVN_CLIENT_1
|
||||
|
||||
#define PKGLIBDIR "@PKGLIBDIR"
|
||||
|
||||
#cmakedefine FG_HAVE_HLA
|
||||
|
|
|
@ -30,8 +30,17 @@ get_property(FG_LIBS GLOBAL PROPERTY FG_LIBS)
|
|||
#message(STATUS "OSG libs ${OPENSCENEGRAPH_LIBRARIES}")
|
||||
#message(STATUS "SG libs ${SIMGEAR_LIBRARIES}")
|
||||
|
||||
if(RTI_FOUND)
|
||||
find_sg_component(hla13 SIMGEAR_LIBRARIES)
|
||||
find_sg_component(hla SIMGEAR_LIBRARIES)
|
||||
set(HLA_LIBRARIES ${RTI_LIBRARIES})
|
||||
else()
|
||||
set(HLA_LIBRARIES "")
|
||||
endif()
|
||||
|
||||
target_link_libraries(fgfs
|
||||
${FG_LIBS}
|
||||
${HLA_LIBRARIES}
|
||||
${SIMGEAR_LIBRARIES}
|
||||
${OPENSCENEGRAPH_LIBRARIES}
|
||||
${OPENAL_LIBRARY}
|
||||
|
|
|
@ -30,3 +30,7 @@ set(SOURCES
|
|||
|
||||
flightgear_component(Network "${SOURCES}")
|
||||
|
||||
if(RTI_FOUND)
|
||||
add_subdirectory(HLA)
|
||||
endif()
|
||||
|
||||
|
|
7
src/Network/HLA/CMakeLists.txt
Normal file
7
src/Network/HLA/CMakeLists.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
include(FlightGearComponent)
|
||||
|
||||
set(SOURCES
|
||||
hla.cxx
|
||||
)
|
||||
|
||||
flightgear_component(HLA "${SOURCES}")
|
Loading…
Reference in a new issue