1
0
Fork 0

Add the hla stuff to the cmake build system.

This commit is contained in:
Mathias Froehlich 2010-12-26 13:55:52 +01:00
parent 70dd6279a7
commit 3134acca83
5 changed files with 35 additions and 8 deletions

View file

@ -72,9 +72,9 @@ endif()
if(EVENT_INPUT) if(EVENT_INPUT)
message(STATUS "checking event-based Input") message(STATUS "checking event-based Input")
IF(APPLE) IF(APPLE)
elseif(CMAKE_SYSTEM_NAME MATCHES "Linux") elseif(CMAKE_SYSTEM_NAME MATCHES "Linux")
else() else()
message(WARNING "event input is not supported on this platform yet") message(WARNING "event input is not supported on this platform yet")
endif() endif()
@ -163,6 +163,11 @@ endif(HAVE_RT)
endif(NOT CLOCK_GETTIME_IN_LIBC) endif(NOT CLOCK_GETTIME_IN_LIBC)
endif(HAVE_CLOCK_GETTIME) endif(HAVE_CLOCK_GETTIME)
find_package(RTI)
if(RTI_FOUND)
set(FG_HAVE_HLA 1)
endif()
if(CMAKE_COMPILER_IS_GNUCXX) if(CMAKE_COMPILER_IS_GNUCXX)
set(WARNING_FLAGS -Wall) set(WARNING_FLAGS -Wall)
endif(CMAKE_COMPILER_IS_GNUCXX) 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_C_FLAGS "${CMAKE_C_FLAGS} ${WARNING_FLAGS} ${MSVC_FLAGS} -D_REENTRANT")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_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} include_directories(${OPENSCENEGRAPH_INCLUDE_DIRS}
${Boost_INCLUDE_DIRS} ${Boost_INCLUDE_DIRS}
${ZLIB_INCLUDE_DIR} ${ZLIB_INCLUDE_DIR}
${ALUT_INCLUDE_DIR} ${ALUT_INCLUDE_DIR}
${OPENAL_INCLUDE_DIR} ${OPENAL_INCLUDE_DIR}
${SIMGEAR_INCLUDE_DIR} ${SIMGEAR_INCLUDE_DIR}

View file

@ -4,17 +4,17 @@
#cmakedefine ENABLE_SP_FDM #cmakedefine ENABLE_SP_FDM
// JSBSim needs this, to switch from standalone to in-FG mode // 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 #define PU_USE_NONE // PLIB needs this to avoid linking to GLUT
#cmakedefine ENABLE_PLIB_JOYSTICK #cmakedefine ENABLE_PLIB_JOYSTICK
// threads are required (used to be optional) // threads are required (used to be optional)
#define ENABLE_THREADS 1 #define ENABLE_THREADS 1
// audio support is assumed // audio support is assumed
#define ENABLE_AUDIO_SUPPORT 1 #define ENABLE_AUDIO_SUPPORT 1
#cmakedefine HAVE_SYS_TIME_H #cmakedefine HAVE_SYS_TIME_H
#cmakedefine HAVE_WINDOWS_H #cmakedefine HAVE_WINDOWS_H
@ -33,3 +33,5 @@
#cmakedefine HAVE_LIBSVN_CLIENT_1 #cmakedefine HAVE_LIBSVN_CLIENT_1
#define PKGLIBDIR "@PKGLIBDIR" #define PKGLIBDIR "@PKGLIBDIR"
#cmakedefine FG_HAVE_HLA

View file

@ -30,8 +30,17 @@ get_property(FG_LIBS GLOBAL PROPERTY FG_LIBS)
#message(STATUS "OSG libs ${OPENSCENEGRAPH_LIBRARIES}") #message(STATUS "OSG libs ${OPENSCENEGRAPH_LIBRARIES}")
#message(STATUS "SG libs ${SIMGEAR_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 target_link_libraries(fgfs
${FG_LIBS} ${FG_LIBS}
${HLA_LIBRARIES}
${SIMGEAR_LIBRARIES} ${SIMGEAR_LIBRARIES}
${OPENSCENEGRAPH_LIBRARIES} ${OPENSCENEGRAPH_LIBRARIES}
${OPENAL_LIBRARY} ${OPENAL_LIBRARY}

View file

@ -30,3 +30,7 @@ set(SOURCES
flightgear_component(Network "${SOURCES}") flightgear_component(Network "${SOURCES}")
if(RTI_FOUND)
add_subdirectory(HLA)
endif()

View file

@ -0,0 +1,7 @@
include(FlightGearComponent)
set(SOURCES
hla.cxx
)
flightgear_component(HLA "${SOURCES}")