add support for fetching

cxxopts_mwiniimporter_ci_debug
Bret Curtis 1 year ago
parent 3852fd7994
commit e0a92c0131

@ -40,6 +40,7 @@ if [[ $CI_OPENMW_USE_STATIC_DEPS ]]; then
-DOPENMW_USE_SYSTEM_OSG=OFF
-DOPENMW_USE_SYSTEM_BULLET=OFF
-DOPENMW_USE_SYSTEM_SQLITE3=OFF
-DOPENMW_USE_SYSTEM_CXXOPTS=OFF
-DOPENMW_USE_SYSTEM_RECASTNAVIGATION=OFF
)
fi

@ -236,9 +236,6 @@ find_package(OpenGL REQUIRED)
find_package(LZ4 REQUIRED)
find_package(CXXOPTS REQUIRED)
include_directories(SYSTEM ${CXXOPTS_INCLUDE_DIRS})
if (USE_QT)
find_package(QT REQUIRED COMPONENTS Core NAMES Qt6 Qt5)
if (QT_VERSION_MAJOR VERSION_EQUAL 5)
@ -366,6 +363,13 @@ if (USE_SYSTEM_TINYXML)
include_directories(SYSTEM ${TinyXML_INCLUDE_DIRS})
endif()
# CXXOPTS
option(OPENMW_USE_SYSTEM_CXXOPTS "Use system provided CXXOPTS library" ON)
if(OPENMW_USE_SYSTEM_CXXOPTS)
find_package(CXXOPTS REQUIRED)
endif()
include_directories(SYSTEM ${CXXOPTS_INCLUDE_DIRS})
# Platform specific
if (WIN32)
if(NOT MINGW)

@ -190,6 +190,17 @@ if(NOT OPENMW_USE_SYSTEM_RECASTNAVIGATION)
FetchContent_MakeAvailableExcludeFromAll(recastnavigation)
endif()
if(NOT OPENMW_USE_SYSTEM_CXXOPTS)
include(FetchContent)
FetchContent_Declare(cxxopts
URL https://github.com/jarro2783/cxxopts/archive/refs/tags/v3.1.1.zip
URL_HASH SHA512=df8a322f2ecef9bc0e2b17904b008e19e8f6d0384ba2ec95375c15be14953b008550cb119828f03a4eee12795c8df9a558a6eeb8c0e41ad7092b90270d517f5f
SOURCE_DIR fetched/cxxopts
)
FetchContent_MakeAvailableExcludeFromAll(cxxopts)
set(CXXOPTS_INCLUDE_DIRS "${cxxopts_SOURCE_DIR}/include" PARENT_SCOPE)
endif()
if (NOT OPENMW_USE_SYSTEM_SQLITE3)
include(FetchContent)
FetchContent_Declare(sqlite3

Loading…
Cancel
Save