diff options
author | Nicky <nicky.dasmijn@gmail.com> | 2022-04-06 16:32:52 +0200 |
---|---|---|
committer | Nicky <nicky.dasmijn@gmail.com> | 2022-04-06 16:32:52 +0200 |
commit | 786b291d9c6b784c7ce6ceef0e38a4ec76ea14db (patch) | |
tree | ed7386562337f06b212e0e95753c891ec7efbb3a /indra/cmake/OpenJPEG.cmake | |
parent | 7522cea2528f9cfdf5283a7920dd3434417b20f4 (diff) |
Move CMake files to modernized cmake syntax, step 1.
Change projects to cmake targetsto get rid of havig to hardcore
include directories and link libraries in consumer projects.
Diffstat (limited to 'indra/cmake/OpenJPEG.cmake')
-rw-r--r-- | indra/cmake/OpenJPEG.cmake | 18 |
1 files changed, 6 insertions, 12 deletions
diff --git a/indra/cmake/OpenJPEG.cmake b/indra/cmake/OpenJPEG.cmake index bf0bde2ba7..67292250bb 100644 --- a/indra/cmake/OpenJPEG.cmake +++ b/indra/cmake/OpenJPEG.cmake @@ -1,22 +1,16 @@ # -*- cmake -*- include(Prebuilt) -set(OPENJPEG_FIND_QUIETLY ON) -set(OPENJPEG_FIND_REQUIRED ON) +if( TARGET openjpeg::openjpeg ) + return() +endif() +create_target( openjpeg::openjpeg ) if (USESYSTEMLIBS) include(FindOpenJPEG) else (USESYSTEMLIBS) use_prebuilt_binary(openjpeg) - if(WINDOWS) - # Windows has differently named release and debug openjpeg(d) libs. - set(OPENJPEG_LIBRARIES - debug openjpegd - optimized openjpeg) - else(WINDOWS) - set(OPENJPEG_LIBRARIES openjpeg) - endif(WINDOWS) - - set(OPENJPEG_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include/openjpeg) + set_target_libraries(openjpeg::openjpeg openjpeg ) + set_target_include_dirs( openjpeg::openjpeg ${LIBS_PREBUILT_DIR}/include/openjpeg) endif (USESYSTEMLIBS) |