1
0
Fork 0

CMake fails to detect OpenRTI include files.

This commit is contained in:
gallaert 2017-08-16 21:16:10 +01:00 committed by James Turner
parent e78b92ca27
commit 4b60bc7a5b
3 changed files with 23 additions and 18 deletions

View file

@ -42,10 +42,10 @@ if(NOT FG_BUILD_TYPE)
endif()
if(APPLE)
set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks")
# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
set(CMAKE_INSTALL_RPATH "@loader_path/../Frameworks")
# when building, don't use the install RPATH already
# (but later on when installing)
SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE)
endif()
# let's use & require C++11 - note these are only functional with CMake 3.1
@ -132,8 +132,8 @@ elseif(WIN32)
MESSAGE("Installing: ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS}")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux" OR
${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
${CMAKE_SYSTEM_NAME} MATCHES "FreeBSD" OR
${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
find_package(Threads REQUIRED)
find_package(X11 REQUIRED)
@ -307,12 +307,12 @@ find_package(OpenSceneGraph 3.2.0 REQUIRED
)
if (MSVC)
find_package(CrashRpt)
if (CRASHRPT_FOUND)
set(HAVE_CRASHRPT 1)
message(STATUS "Using CrashRpt")
find_package(CrashRpt)
if (CRASHRPT_FOUND)
set(HAVE_CRASHRPT 1)
message(STATUS "Using CrashRpt")
include_directories( ${CRASHRPT_INCLUDE_DIR})
endif()
endif()
endif()
#if(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
@ -403,10 +403,15 @@ if(ENABLE_PROFILE)
endif()
if(ENABLE_RTI)
message(STATUS "RTI: ENABLED")
find_package(RTI)
find_package(PkgConfig)
if(PKG_CONFIG_FOUND)
set(ENV{PKG_CONFIG_PATH} "${CMAKE_INSTALL_PREFIX}/${_LIBDIR_DEFAULT}/pkgconfig:$ENV{PKG_CONFIG_PATH}")
pkg_check_modules(RTI hla-rti13)
endif(PKG_CONFIG_FOUND)
if(RTI_FOUND)
set(FG_HAVE_HLA 1)
message(STATUS "RTI: ENABLED")
else()
message(STATUS "RTI: DISABLED")
endif(RTI_FOUND)
else()
message(STATUS "RTI: DISABLED")

View file

@ -21,7 +21,7 @@ target_link_libraries(fgai
SimGearCore SimGearScene
${OPENSCENEGRAPH_LIBRARIES}
${OPENGL_LIBRARIES}
${RTI_LIBRARIES}
${RTI_LDFLAGS}
)
install(TARGETS fgai RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})

View file

@ -35,7 +35,7 @@ if(RTI_FOUND)
HLAWindowDrawable.cxx
HLAWindowDrawableClass.cxx
)
set(FGVIEWER_RTI_LIBRARIES ${RTI_LIBRARIES})
set(FGVIEWER_RTI_LIBRARIES ${RTI_LDFLAGS})
else()
set(FGVIEWER_RTI_LIBRARIES "")
set(FGVIEWER_RTI_SOURCES "")
@ -47,9 +47,9 @@ if(X11_FOUND)
endif()
target_link_libraries(fgviewer
SimGearScene SimGearCore
SimGearScene SimGearCore
${OPENGL_LIBRARIES}
${FGVIEWER_RTI_LIBRARIES}
${FGVIEWER_RTI_LIBRARIES}
${GDAL_LIBRARY}
)
install(TARGETS fgviewer RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})