From ac927f2eee0e27a61f1d8f9754bdc05f30a43e12 Mon Sep 17 00:00:00 2001 From: Mathieu Malaterre Date: Mon, 26 Sep 2016 12:01:31 +0200 Subject: [PATCH] OPENJPEG_NAMESPACE is configurable by user --- CMakeLists.txt | 10 +++++----- src/lib/openjp2/CMakeLists.txt | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f55be537..8002a3ed 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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 diff --git a/src/lib/openjp2/CMakeLists.txt b/src/lib/openjp2/CMakeLists.txt index c853f987..131ed73b 100644 --- a/src/lib/openjp2/CMakeLists.txt +++ b/src/lib/openjp2/CMakeLists.txt @@ -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