[vlmc-devel] commit: nsis: add some important files to the package. (Ludovic Fauvet )

git at videolan.org git at videolan.org
Mon Mar 29 00:45:59 CEST 2010


vlmc | branch: master | Ludovic Fauvet <etix at l0cal.com> | Mon Mar 29 00:43:53 2010 +0200| [cc66649a533aa977d1b50fcac4eb51512dfcbfe2] | committer: Ludovic Fauvet 

nsis: add some important files to the package.

This includes COPYING, AUTHORS, TRANSLATORS and NEWS.

> http://git.videolan.org/gitweb.cgi/vlmc.git/?a=commit;h=cc66649a533aa977d1b50fcac4eb51512dfcbfe2
---

 nsis/CMakeLists.txt |   26 +++++++++++++++++---------
 1 files changed, 17 insertions(+), 9 deletions(-)

diff --git a/nsis/CMakeLists.txt b/nsis/CMakeLists.txt
index c743b49..276896e 100644
--- a/nsis/CMakeLists.txt
+++ b/nsis/CMakeLists.txt
@@ -4,7 +4,9 @@ SET(NSIS_OUTPUT_FILE "${PROJECT_NAME}.exe")
 
 # NSIS is only available for Win32 builds (native or cross compilation)
 IF(WIN32)
-    
+
+    SET(NSIS_OUTPUT_DIR "${CMAKE_BINARY_DIR}/bin/")
+
     # Check contribs existence
     IF(EXISTS "${CMAKE_SOURCE_DIR}/contribs/")
 
@@ -12,26 +14,32 @@ IF(WIN32)
 
         # Copy necessary libraries required at runtime
         FILE(COPY "${CMAKE_SOURCE_DIR}/contribs/bin/"
-             DESTINATION "${CMAKE_BINARY_DIR}/bin/"
+             DESTINATION ${NSIS_OUTPUT_DIR}
              FILES_MATCHING PATTERN "*.dll")
 
+        # Copy some important files
+        CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/COPYING" ${NSIS_OUTPUT_DIR} COPYONLY)
+        CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/AUTHORS" ${NSIS_OUTPUT_DIR} COPYONLY)
+        CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/TRANSLATORS" ${NSIS_OUTPUT_DIR} COPYONLY)
+        CONFIGURE_FILE("${CMAKE_SOURCE_DIR}/NEWS" ${NSIS_OUTPUT_DIR} COPYONLY)
+
         MESSAGE(STATUS "Configuring NSIS")
-        
+
         # Copy and configure the nsis script file
-        CONFIGURE_FILE(installer.nsi "${CMAKE_BINARY_DIR}/bin/installer.nsi" @ONLY)
+        CONFIGURE_FILE(installer.nsi "${NSIS_OUTPUT_DIR}/installer.nsi" @ONLY)
 
         ADD_CUSTOM_TARGET(installer
-            ${CMAKE_COMMAND} -E remove "${CMAKE_BINARY_DIR}/bin/${NSIS_OUTPUT_FILE}"
-            COMMAND makensis "${CMAKE_BINARY_DIR}/bin/installer.nsi"
-            WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/bin/"
+            ${CMAKE_COMMAND} -E remove "${NSIS_OUTPUT_DIR}${NSIS_OUTPUT_FILE}"
+            COMMAND makensis "${NSIS_OUTPUT_DIR}/installer.nsi"
+            WORKING_DIRECTORY "${NSIS_OUTPUT_DIR}"
             )
 
         ADD_DEPENDENCIES(installer vlmc)
 
     ELSE(EXISTS "${CMAKE_SOURCE_DIR}/contribs/")
-        
+
         MESSAGE(WARNING "Contribs not available, you won't be able to create an installer. Read INSTALL.win32 for details.")
-    
+
     ENDIF(EXISTS "${CMAKE_SOURCE_DIR}/contribs/")
 
 ENDIF(WIN32)



More information about the Vlmc-devel mailing list