Add support for linking with opm-common debug library

This commit is contained in:
Magne Sjaastad 2023-08-24 12:54:31 +02:00
parent 3800246b79
commit 559f02c13a

View File

@ -448,9 +448,16 @@ if((NOT RESINSIGHT_BUILD_LIBS_FROM_SOURCE) AND MSVC)
URL https://github.com/CeetronSolutions/resinsight-dependencies/releases/download/2023.08/custom-opm-common.zip
)
FetchContent_Populate(ri-dependencies)
list(APPEND EXTERNAL_LINK_LIBRARIES
${ri-dependencies_SOURCE_DIR}/custom-opm-common.lib
)
add_library(custom-opm-common STATIC IMPORTED)
set_target_properties(custom-opm-common PROPERTIES
IMPORTED_CONFIGURATIONS "Debug;Release"
IMPORTED_LOCATION_DEBUG "${ri-dependencies_SOURCE_DIR}/custom-opm-common_debug.lib"
IMPORTED_LOCATION_RELEASE "${ri-dependencies_SOURCE_DIR}/custom-opm-common.lib"
)
list(APPEND EXTERNAL_LINK_LIBRARIES custom-opm-common)
message(STATUS "opm-common: Enabled use of precompiled library")
else()
add_subdirectory(ThirdParty/custom-opm-common)