migration: prefer ./external for RTI/ArcGIS; detect RTI arch in FindRTI; install/unpack ArcGIS into ./external
This commit is contained in:
1 parent
fe78be0afa
commit
7c080db59f
4 files changed
+42
-18
No files matched your search
+25
-10
@@ -71,16 +71,31 @@ IF(NOT RTI_DIR)
|
||||
set(_RTI_DIR_NOT_FOUND TRUE)
|
||||
set(_RTI_DIR "")
|
||||
ENDIF()
|
||||
SET(_rti_gcc_arch "x64Linux3gcc4.8.2")
|
||||
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0.0)
|
||||
SET(_rti_gcc_arch "x64Linux3gcc5.4.0")
|
||||
SET(_tmp "${_RTI_DIR}/lib/${_rti_gcc_arch}")
|
||||
IF (NOT EXISTS ${_tmp})
|
||||
SET(_rti_gcc_arch "x64Linux4gcc7.3.0")
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
SET(_rti_gcc_arch "x64Linux3gcc4.8.2")
|
||||
IF("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU" OR "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
|
||||
IF(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.0.0)
|
||||
# Prefer newer gcc-based RTI builds; try a sequence then fall back to any x64Linux4gcc* dir found under RTI lib
|
||||
SET(_preferred_archs "x64Linux4gcc8.5.0;x64Linux4gcc7.3.0;x64Linux3gcc5.4.0")
|
||||
SET(_found_arch "")
|
||||
foreach(_cand IN LISTS _preferred_archs)
|
||||
if(EXISTS "${_RTI_DIR}/lib/${_cand}")
|
||||
SET(_found_arch "${_cand}")
|
||||
break()
|
||||
endif()
|
||||
endforeach()
|
||||
if(_found_arch STREQUAL "")
|
||||
# fallback: pick any x64Linux* directory under lib
|
||||
file(GLOB _rti_arch_dirs RELATIVE "${_RTI_DIR}/lib" "${_RTI_DIR}/lib/x64Linux*")
|
||||
list(GET _rti_arch_dirs 0 _found_arch)
|
||||
endif()
|
||||
if(NOT _found_arch STREQUAL "")
|
||||
SET(_rti_gcc_arch "${_found_arch}")
|
||||
else()
|
||||
# final fallbacks
|
||||
SET(_rti_gcc_arch "x64Linux4gcc7.3.0")
|
||||
endif()
|
||||
ENDIF()
|
||||
ENDIF()
|
||||
SET(_arch "${_rti_gcc_arch}")
|
||||
ENDIF()
|
||||
SET(RTI_DIR "${_RTI_DIR}" CACHE STRING "RTI base path" FORCE)
|
||||
|
||||
Reference in new issue
Block a user