Making the install and lib, bin directories consistent.
authorEthan Rublee <no@email>
Mon, 30 May 2011 22:13:32 +0000 (22:13 +0000)
committerEthan Rublee <no@email>
Mon, 30 May 2011 22:13:32 +0000 (22:13 +0000)
CMakeLists.txt
OpenCVModule.cmake
modules/ffmpeg/CMakeLists.txt
modules/gpu/CMakeLists.txt
modules/haartraining/CMakeLists.txt
modules/highgui/CMakeLists.txt
modules/stitching/CMakeLists.txt
modules/traincascade/CMakeLists.txt

index b7af6fd..b3d95ae 100644 (file)
@@ -1152,7 +1152,7 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/OpenCVConfig.cmake.in" "${CMAKE_BINA
 \r
 if(UNIX)\r
     # For a command "FIND_PACKAGE(FOO)", CMake will look at the directory /usr/share|lib/FOO/FOOConfig.cmake, so:\r
-    install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake DESTINATION ${CMAKE_INSTALL_PREFIX}/share/opencv/)\r
+    install(FILES ${CMAKE_BINARY_DIR}/unix-install/OpenCVConfig.cmake DESTINATION share/opencv/)\r
 endif()\r
 \r
 # --------------------------------------------------------------------------------------------\r
@@ -1271,9 +1271,9 @@ if(BUILD_PACKAGE)
 \r
         if(CMAKE_INSTALL_DEBUG_LIBRARIES)\r
             foreach(m calib3d core contrib features2d ffmpeg flann gpu highgui imgproc legacy ml objdetect video)\r
-                install(FILES ${CMAKE_BINARY_DIR}/bin/Debug/opencv_${m}${OPENCV_DLLVERSION}d.dll\r
+                install(FILES  ${EXECUTABLE_OUTPUT_PATH}/Debug/opencv_${m}${OPENCV_DLLVERSION}d.dll\r
             DESTINATION bin COMPONENT main)\r
-                install(FILES ${CMAKE_BINARY_DIR}/lib/Debug/opencv_${m}${OPENCV_DLLVERSION}d.lib\r
+                install(FILES  ${LIBRARY_OUTPUT_PATH}/Debug/opencv_${m}${OPENCV_DLLVERSION}d.lib\r
             DESTINATION lib COMPONENT main)\r
             endforeach()\r
         endif()\r
index 0447bf9..ce27185 100644 (file)
@@ -52,9 +52,9 @@ macro(define_opencv_module name)
     # Additional target properties
     set_target_properties(${the_target} PROPERTIES
         DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
-        ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/"
-        RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
-        INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
+        ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
+        RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
+        INSTALL_NAME_DIR lib
         )
 
     if(PCHSupport_FOUND AND USE_PRECOMPILED_HEADERS)
@@ -136,7 +136,7 @@ macro(define_opencv_module name)
         # Additional target properties
         set_target_properties(${the_target} PROPERTIES
             DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
-            RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
+            RUNTIME_OUTPUT_DIRECTORY "${EXECUTABLE_OUTPUT_PATH}"
             )
                        
                if(ENABLE_SOLUTION_FOLDERS)
index 4ea2ffc..71b5a35 100644 (file)
@@ -43,8 +43,8 @@ set_target_properties(${the_target} PROPERTIES
                       VERSION ${OPENCV_VERSION}
                       OUTPUT_NAME "${the_target}${OPENCV_DLLVERSION}"
                       DEFINE_SYMBOL "CVAPI_EXPORTS"
-                      ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/"
-                      RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
+                      ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
+                      RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
                       )
                                          
 if(ENABLE_SOLUTION_FOLDERS)
index 9d67437..db7821b 100644 (file)
@@ -119,9 +119,9 @@ endif()
 # Additional target properties
 set_target_properties(${the_target} PROPERTIES
        DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
-       ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/"
-       RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
-       INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
+    ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
+    RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
+    INSTALL_NAME_DIR lib
        )
 
 # Add the required libraries for linking:
@@ -218,7 +218,7 @@ if(BUILD_TESTS AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/test)
     # Additional target properties
     set_target_properties(${the_test_target} PROPERTIES
         DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
-        RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
+        RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
         )
        
        if(ENABLE_SOLUTION_FOLDERS)
index 79e9cb3..5628826 100644 (file)
@@ -40,9 +40,9 @@ set(cvhaartraining_lib_src
 add_library(opencv_haartraining_engine STATIC ${cvhaartraining_lib_src})
 set_target_properties(opencv_haartraining_engine PROPERTIES
     DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
-    ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/"
-    RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
-    INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
+    ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
+    RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
+    INSTALL_NAME_DIR lib
     )
 
 if(NOT ANDROID)
@@ -91,4 +91,4 @@ if(ENABLE_SOLUTION_FOLDERS)
        set_target_properties(opencv_haartraining_engine PROPERTIES FOLDER "applications")
 endif()        
 
-endif()
\ No newline at end of file
+endif()
index 597c1ea..37d2f0b 100644 (file)
@@ -282,9 +282,9 @@ set_target_properties(${the_target} PROPERTIES
 # Additional target properties
 set_target_properties(${the_target} PROPERTIES
     DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
-    ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/"
-    RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
-    INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
+    ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
+    RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
+    INSTALL_NAME_DIR lib
     LINK_INTERFACE_LIBRARIES ""
     )
 
index e26d2ec..2b8d559 100644 (file)
@@ -26,9 +26,9 @@ add_executable(${the_target} ${stitching_files})
 add_dependencies(${the_target} ${stitching_libs})\r
 set_target_properties(${the_target} PROPERTIES\r
                       DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"\r
-                      ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/"\r
-                      RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"\r
-                      INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"\r
+                      ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}\r
+                      RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}\r
+                      INSTALL_NAME_DIR lib\r
                       OUTPUT_NAME "opencv_stitching")\r
                                          \r
 if(ENABLE_SOLUTION_FOLDERS)\r
index 2802703..51d423e 100644 (file)
@@ -30,9 +30,9 @@ add_executable(${the_target} ${traincascade_files})
 add_dependencies(${the_target} ${traincascade_libs})
 set_target_properties(${the_target} PROPERTIES
                       DEBUG_POSTFIX "${OPENCV_DEBUG_POSTFIX}"
-                      ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib/"
-                      RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
-                      INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
+                      ARCHIVE_OUTPUT_DIRECTORY ${LIBRARY_OUTPUT_PATH}
+                      RUNTIME_OUTPUT_DIRECTORY ${EXECUTABLE_OUTPUT_PATH}
+                      INSTALL_NAME_DIR lib
                       OUTPUT_NAME "opencv_traincascade")
                                          
 if(ENABLE_SOLUTION_FOLDERS)