mirror of
https://github.com/OPM/ResInsight.git
synced 2025-02-25 18:55:39 -06:00
GHA: Use precompiled opm-common
* GHA: Use precompiled opm-common * Fix cmake logic
This commit is contained in:
@@ -436,22 +436,21 @@ add_subdirectory(ThirdParty/custom-opm-flowdiag-app)
|
||||
# Option used to build opm-common from source or use precompiled binaries
|
||||
option(RESINSIGHT_BUILD_LIBS_FROM_SOURCE "Build opm-common from source" ON)
|
||||
|
||||
if(RESINSIGHT_BUILD_LIBS_FROM_SOURCE)
|
||||
if((NOT RESINSIGHT_BUILD_LIBS_FROM_SOURCE) AND MSVC)
|
||||
FetchContent_Declare(
|
||||
ri-dependencies
|
||||
URL https://github.com/CeetronSolutions/resinsight-dependencies/releases/download/2023.04/custom-opm-common.zip
|
||||
)
|
||||
FetchContent_Populate(ri-dependencies)
|
||||
list(APPEND EXTERNAL_LINK_LIBRARIES
|
||||
${ri-dependencies_SOURCE_DIR}/custom-opm-common.lib
|
||||
)
|
||||
message(STATUS "opm-common: Enabled use of precompiled library")
|
||||
else()
|
||||
add_subdirectory(ThirdParty/custom-opm-common)
|
||||
add_subdirectory(ThirdParty/custom-opm-common/custom-opm-parser-tests)
|
||||
list(APPEND OPM_LIBRARIES custom-opm-common)
|
||||
set_property(TARGET opm-parser-tests PROPERTY FOLDER "Thirdparty/OPM")
|
||||
else()
|
||||
if(MSVC)
|
||||
FetchContent_Declare(
|
||||
ri-dependencies
|
||||
URL https://github.com/CeetronSolutions/resinsight-dependencies/releases/download/2023.04/custom-opm-common.zip
|
||||
)
|
||||
FetchContent_Populate(ri-dependencies)
|
||||
list(APPEND EXTERNAL_LINK_LIBRARIES
|
||||
${ri-dependencies_SOURCE_DIR}/custom-opm-common.lib
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
list(APPEND OPM_LIBRARIES custom-opm-flowdiagnostics custom-opm-flowdiag-app)
|
||||
|
||||
Reference in New Issue
Block a user