]> granicus.if.org Git - openjpeg/commitdiff
OPENJPEG_NAMESPACE is configurable by user
authorMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 26 Sep 2016 10:01:31 +0000 (12:01 +0200)
committerMathieu Malaterre <mathieu.malaterre@gmail.com>
Mon, 26 Sep 2016 10:02:22 +0000 (12:02 +0200)
CMakeLists.txt
src/lib/openjp2/CMakeLists.txt

index f55be537c7e241c35d171e04c4890275890f0f8c..8002a3eda19052daa79b88207fe5442a02ed1efb 100644 (file)
@@ -67,7 +67,7 @@ set(OPENJPEG_LIBRARY_PROPERTIES
 # --------------------------------------------------------------------------
 # Path to additional CMake modules
 set(CMAKE_MODULE_PATH
-    ${CMAKE_SOURCE_DIR}/cmake
+    ${${OPENJPEG_NAMESPACE}_SOURCE_DIR}/cmake
     ${CMAKE_MODULE_PATH})
 
 # --------------------------------------------------------------------------
@@ -163,8 +163,8 @@ TEST_BIG_ENDIAN(OPJ_BIG_ENDIAN)
 #-----------------------------------------------------------------------------
 # Setup file for setting custom ctest vars
 configure_file(
-  ${CMAKE_SOURCE_DIR}/cmake/CTestCustom.cmake.in
-  ${CMAKE_BINARY_DIR}/CTestCustom.cmake
+  ${${OPENJPEG_NAMESPACE}_SOURCE_DIR}/cmake/CTestCustom.cmake.in
+  ${${OPENJPEG_NAMESPACE}_BINARY_DIR}/CTestCustom.cmake
   @ONLY
   )
 
@@ -323,8 +323,8 @@ endif()
 #-----------------------------------------------------------------------------
 # install all targets referenced as OPENJPEGTargets
 install(EXPORT OpenJPEGTargets DESTINATION ${OPENJPEG_INSTALL_PACKAGE_DIR})
-configure_file( ${OPENJPEG_SOURCE_DIR}/cmake/OpenJPEGConfig.cmake.in
-  ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
+configure_file( ${${OPENJPEG_NAMESPACE}_SOURCE_DIR}/cmake/OpenJPEGConfig.cmake.in
+  ${${OPENJPEG_NAMESPACE}_BINARY_DIR}/OpenJPEGConfig.cmake
   @ONLY
 )
 install( FILES ${OPENJPEG_BINARY_DIR}/OpenJPEGConfig.cmake
index c853f9878d6fefe248266e12acd289709679a96d..131ed73b126e490858cd5fc9b674aa7641f482f5 100644 (file)
@@ -5,7 +5,7 @@ install( FILES  ${CMAKE_CURRENT_BINARY_DIR}/opj_config.h
  DESTINATION ${OPENJPEG_INSTALL_INCLUDE_DIR} COMPONENT Headers)
 
 include_directories(
-  ${OPENJPEG_BINARY_DIR}/src/lib/openjp2 # opj_config.h and opj_config_private.h
+  ${${OPENJPEG_NAMESPACE}_BINARY_DIR}/src/lib/openjp2 # opj_config.h and opj_config_private.h
 )
 # Defines the source code for the library
 set(OPENJPEG_SRCS