diff --git a/cmake/dependencies/oiio.cmake b/cmake/dependencies/oiio.cmake index b02b747f..2c911cc3 100644 --- a/cmake/dependencies/oiio.cmake +++ b/cmake/dependencies/oiio.cmake @@ -83,7 +83,7 @@ LIST(APPEND _configure_options "-DJPEGTURBO_LIBRARY=${_jpegturbo_library}") LIST(APPEND _configure_options "-DJPEGTURBO_INCLUDE_DIR=${_jpegturbo_include_dir}") LIST(APPEND _configure_options "-DOpenJPEG_ROOT=${RV_DEPS_OPENJPEG_ROOT_DIR}") -GET_TARGET_PROPERTY(_openjpeg_library OpenJpeg::OpenJpeg IMPORTED_LOCATION) + GET_TARGET_PROPERTY(_openjpeg_library OpenJpeg::OpenJpeg IMPORTED_LOCATION) GET_TARGET_PROPERTY(_openjpeg_include_dir OpenJpeg::OpenJpeg INTERFACE_INCLUDE_DIRECTORIES) LIST(APPEND _configure_options "-DOPENJPEG_OPENJP2_LIBRARY=${_openjpeg_library}") LIST(APPEND _configure_options "-DOPENJPEG_INCLUDE_DIR=${_openjpeg_include_dir}") @@ -160,7 +160,7 @@ IF(NOT RV_TARGET_WINDOWS) jpeg-turbo::jpeg Tiff::Tiff OpenEXR::OpenEXR - RV_DEPS_OPENJPEG + OpenJpeg::OpenJpeg jpeg-turbo::turbojpeg PNG::PNG Boost::headers diff --git a/cmake/dependencies/openjpeg.cmake b/cmake/dependencies/openjpeg.cmake index b96b3978..c3782ac3 100644 --- a/cmake/dependencies/openjpeg.cmake +++ b/cmake/dependencies/openjpeg.cmake @@ -30,7 +30,12 @@ SET(_download_hash "5cbb822a1203dd75b85639da4f4ecaab" ) -RV_MAKE_STANDARD_LIB_NAME("openjp2" "2.5.0" "SHARED" "") +IF(RV_TARGET_WINDOWS) + RV_MAKE_STANDARD_LIB_NAME("openjp2" "" "SHARED" "") +ELSE() + RV_MAKE_STANDARD_LIB_NAME("openjp2" "2.5.0" "SHARED" "") +ENDIF() + # The '_configure_options' list gets reset and initialized in 'RV_CREATE_STANDARD_DEPS_VARIABLES' @@ -65,18 +70,22 @@ RV_COPY_LIB_BIN_FOLDERS() ADD_DEPENDENCIES(dependencies ${_target}-stage-target) ADD_LIBRARY(OpenJpeg::OpenJpeg SHARED IMPORTED GLOBAL) +ADD_DEPENDENCIES(OpenJpeg::OpenJpeg ${_target}) + SET_PROPERTY( TARGET OpenJpeg::OpenJpeg PROPERTY IMPORTED_LOCATION ${_libpath} ) -SET_PROPERTY( - TARGET OpenJpeg::OpenJpeg - PROPERTY IMPORTED_SONAME ${_libname} -) + IF(RV_TARGET_WINDOWS) SET_PROPERTY( TARGET OpenJpeg::OpenJpeg - PROPERTY IMPORTED_IMPLIB ${_implibpath} + PROPERTY IMPORTED_IMPLIB ${_bin_dir}/${_implibname} + ) +ELSE() + SET_PROPERTY( + TARGET OpenJpeg::OpenJpeg + PROPERTY IMPORTED_SONAME ${_libname} ) ENDIF()