--- CMakeLists.txt.orig 2010-11-30 01:25:33.578000000 +0200 +++ CMakeLists.txt.new 2010-11-30 01:43:45.531250000 +0200 @@ -1100,8 +1100,8 @@ exec_program(mkdir ARGS "-p \"${CMAKE_BINARY_DIR}/win-install/\"" OUTPUT_VARIABLE RET_VAL) configure_file("${CMAKE_CURRENT_SOURCE_DIR}/OpenCVConfig.cmake.in" "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" IMMEDIATE @ONLY) - # Configure the OpenCVConfig.cmake file to have the right paths pointing to the install directory - configure_file("${CMAKE_CURRENT_SOURCE_DIR}/OpenCVConfig.cmake.in" "${CMAKE_INSTALL_PREFIX}/OpenCVConfig.cmake" IMMEDIATE @ONLY) + # Install the OpenCVConfig.cmake file which has the right paths pointing to the install directory + install(FILES "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake" DESTINATION "${CMAKE_INSTALL_PREFIX}/") # if videoInput support is enabled (which is by default on WIN32) copy the static library required to the installation path # DESTINATION could also be "${CMAKE_INSTALL_PREFIX}/lib") to simplify dev environment setup of client applications