]> rtime.felk.cvut.cz Git - opencv.git/commitdiff
- CPack-generated NSIS installer for Win32 is now more complete with debug & release...
authorjlblanco <jlblanco@73c94f0f-984f-4a5f-82bc-2d8db8d8ee08>
Tue, 28 Jul 2009 23:49:14 +0000 (23:49 +0000)
committerjlblanco <jlblanco@73c94f0f-984f-4a5f-82bc-2d8db8d8ee08>
Tue, 28 Jul 2009 23:49:14 +0000 (23:49 +0000)
- Created txt file "doc/packaging.txt" explaining the steps for creating such a package with CPack.

git-svn-id: https://code.ros.org/svn/opencv/trunk@1991 73c94f0f-984f-4a5f-82bc-2d8db8d8ee08

opencv/CMakeLists.txt
opencv/Package.cmake.in
opencv/doc/packaging.txt [new file with mode: 0644]

index 9b445817b2255c52845ee2cf52a333b9b510b59a..f55653376b3ea6a54582f6e784e241f22614f8b8 100644 (file)
@@ -703,7 +703,7 @@ if(WIN32)
        # Set CMAKE_INCLUDE_DIRS_CONFIGCMAKE to the list of include directories:
        
        # This will expand to, for example, <program files>/OpenCV 1.1.0/include
-       set(CMAKE_INCLUDE_DIRS_CONFIGCMAKE "\"\${THIS_OPENCV_CONFIG_PATH}/include\"")
+       set(CMAKE_INCLUDE_DIRS_CONFIGCMAKE "\"\${THIS_OPENCV_CONFIG_PATH}/include\" \"\${THIS_OPENCV_CONFIG_PATH}/include/opencv\"")
 
        # This will expand to, for example, <program files>/OpenCV 1.1.0/lib
        set(CMAKE_LIB_DIRS_CONFIGCMAKE "\"\${THIS_OPENCV_CONFIG_PATH}/lib\"")
@@ -777,6 +777,30 @@ if(BUILD_PACKAGE)
                DESTINATION ${OPENCV_DOC_INSTALL_PATH}
         COMPONENT doc
                )
+
+       IF (WIN32)
+               # Add the "win-install/OpenCVConfig.cmake" file to the "dev" install component 
+               install(FILES 
+                       "${CMAKE_BINARY_DIR}/win-install/OpenCVConfig.cmake"
+                       DESTINATION "."
+                       COMPONENT dev
+                       )
+
+               # Add debug libs to "dev" install component 
+               file(GLOB EXTRA_LIBS_TO_INSTALL "${CMAKE_BINARY_DIR}/lib/Debug/*.lib")
+               install(FILES 
+                       ${EXTRA_LIBS_TO_INSTALL}
+                       DESTINATION "lib"
+                       COMPONENT dev
+                       )
+               # Add debug DLLs to "dev" install component 
+               file(GLOB EXTRA_DLLS_TO_INSTALL "${CMAKE_BINARY_DIR}/bin/Debug/*.dll")
+               install(FILES 
+                       ${EXTRA_DLLS_TO_INSTALL}
+                       DESTINATION "bin"
+                       COMPONENT dev
+                       )
+       ENDIF(WIN32)
                
        include(${CMAKE_BINARY_DIR}/.cpack/Package.cmake)
        
index 902c7c4997b715ba70ceb75e695f058ecaf9221d..50de47e60883278bbe730ea440d3f3afaf7d450a 100644 (file)
@@ -4,6 +4,14 @@
 # (c) Copyrights 2008 Hartmut Seichter, HIT Lab NZ
 #
 
+SET(CMAKE_INSTALL_DEBUG_LIBRARIES 1)
+INCLUDE(InstallRequiredSystemLibraries)
+
+if(WIN32)
+       # Add "<install_path>/bin" to the system PATH
+       SET(CPACK_NSIS_MODIFY_PATH ON)
+endif(WIN32)
+
 set(CPACK_PACKAGE_NAME "OpenCV")
 set(CPACK_PACKAGE_VENDOR "OpenCV project opencvlibrary.sourceforge.net")
 
diff --git a/opencv/doc/packaging.txt b/opencv/doc/packaging.txt
new file mode 100644 (file)
index 0000000..ffa1263
--- /dev/null
@@ -0,0 +1,17 @@
+\r
+INSTRUCTIONS TO BUILD WIN32 PACKAGES WITH CMAKE+CPACK\r
+------------------------------------------------------\r
+\r
+- Install NSIS.\r
+- Generate OpenCV solutions for MSVC using CMake as usual.\r
+- In cmake-gui: \r
+       - Mark BUILD_PACKAGE\r
+       - Mark BUILD_EXAMPLES (If examples are desired to be shipped as binaries...)\r
+       - Unmark ENABLE_OPENMP, since this feature seems to have some issues yet...\r
+       - Mark INSTALL_*_EXAMPLES\r
+- Open the OpenCV solution and build ALL in Debug and Release.\r
+- Build PACKAGE, from the Release configuration. An NSIS installer package will be \r
+  created with both release and debug LIBs and DLLs.\r
+\r
+  \r
+Jose Luis Blanco, 2009/JUL/29\r