Separate fuzz targets to increase coverage (#1416)
[openjpeg.git] / CMakeLists.txt
index d343905b07466091e7a2b69f23c9f798a39564e5..20717722e8a64134d46c7cf723bb8f6e2e6a94d2 100644 (file)
@@ -32,7 +32,7 @@ include_regular_expression("^.*$")
 #-----------------------------------------------------------------------------
 # OPENJPEG version number, useful for packaging and doxygen doc:
 set(OPENJPEG_VERSION_MAJOR 2)
-set(OPENJPEG_VERSION_MINOR 4)
+set(OPENJPEG_VERSION_MINOR 5)
 set(OPENJPEG_VERSION_BUILD 0)
 set(OPENJPEG_VERSION
   "${OPENJPEG_VERSION_MAJOR}.${OPENJPEG_VERSION_MINOR}.${OPENJPEG_VERSION_BUILD}")
@@ -156,7 +156,12 @@ if(NOT OPENJPEG_INSTALL_PACKAGE_DIR)
 endif()
 
 if (APPLE)
-       list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_LIB_DIR}")
+    if (${CMAKE_VERSION} VERSION_LESS 3.0)
+        # For cmake >= 3.0, we turn on CMP0042 and
+        # https://cmake.org/cmake/help/v3.0/policy/CMP0042.html mentions
+        # "Projects wanting @rpath in a target’s install name may remove any setting of the INSTALL_NAME_DIR and CMAKE_INSTALL_NAME_DIR variables"
+        list(APPEND OPENJPEG_LIBRARY_PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${OPENJPEG_INSTALL_LIB_DIR}")
+    endif()
        option(OPJ_USE_DSYMUTIL "Call dsymutil on binaries after build." OFF)
 endif()
 
@@ -305,7 +310,7 @@ if(BUILD_DOC)
 endif()
 
 #-----------------------------------------------------------------------------
-# Buld Testing
+# Build Testing
 option(BUILD_TESTING "Build the tests." OFF)
 if(BUILD_TESTING)
   if(BUILD_CODEC)