From 3f3ca85103babb6ea283827c993fb419872f7545 Mon Sep 17 00:00:00 2001 From: Roman Donchenko Date: Tue, 10 Feb 2015 19:43:29 +0300 Subject: [PATCH] Don't use ${CMAKE_INSTALL_PREFIX} as an install destination Absolute destinations are not necessary, and prevent CPack from working. (cherry picked from commit 0387f8ad56ba863a3d0d6656579e839ccaa66f10) --- CMakeLists.txt | 6 +++--- cmake/OpenCVGenConfig.cmake | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 094a1f9a12..6d3f6ca11a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -605,7 +605,7 @@ if(INSTALL_TESTS AND OPENCV_TEST_DATA_PATH AND UNIX) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake/templates/opencv_run_all_tests_android.sh.in" "${CMAKE_BINARY_DIR}/unix-install/opencv_run_all_tests.sh" @ONLY) install(PROGRAMS "${CMAKE_BINARY_DIR}/unix-install/opencv_run_all_tests.sh" - DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT tests) + DESTINATION . COMPONENT tests) else() set(OPENCV_PYTHON_TESTS_LIST "") if(BUILD_opencv_python) @@ -634,11 +634,11 @@ endif() if(ANDROID OR NOT UNIX) install(FILES ${OPENCV_LICENSE_FILE} PERMISSIONS OWNER_READ GROUP_READ WORLD_READ - DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT libs) + DESTINATION . COMPONENT libs) if(OPENCV_README_FILE) install(FILES ${OPENCV_README_FILE} PERMISSIONS OWNER_READ GROUP_READ WORLD_READ - DESTINATION ${CMAKE_INSTALL_PREFIX} COMPONENT libs) + DESTINATION . COMPONENT libs) endif() endif() diff --git a/cmake/OpenCVGenConfig.cmake b/cmake/OpenCVGenConfig.cmake index cdf418ec82..dacfbb170d 100644 --- a/cmake/OpenCVGenConfig.cmake +++ b/cmake/OpenCVGenConfig.cmake @@ -140,6 +140,6 @@ if(WIN32) install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib" COMPONENT dev) install(EXPORT OpenCVModules DESTINATION "${OpenCV_INSTALL_BINARIES_PREFIX}staticlib" FILE OpenCVModules${modules_file_suffix}.cmake COMPONENT dev) endif() - install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig-version.cmake" DESTINATION "${CMAKE_INSTALL_PREFIX}" COMPONENT dev) - install(FILES "${OpenCV_SOURCE_DIR}/cmake/OpenCVConfig.cmake" DESTINATION "${CMAKE_INSTALL_PREFIX}/" COMPONENT dev) + install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig-version.cmake" DESTINATION "." COMPONENT dev) + install(FILES "${OpenCV_SOURCE_DIR}/cmake/OpenCVConfig.cmake" DESTINATION "." COMPONENT dev) endif()