Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
cmake: Add cpack config
`make package` should create a NSIS installer on Windows. Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
- Loading branch information
1 parent
cdd4132
commit 063bd1d
Showing
3 changed files
with
108 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
# For help take a look at: | ||
# http://www.cmake.org/Wiki/CMake:CPackConfiguration | ||
|
||
### general settings | ||
set(CPACK_PACKAGE_NAME ${PROJECT_NAME}) | ||
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "A project to make RawTherapee's processing algorithms more readily available.") | ||
set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/README.md") | ||
set(CPACK_PACKAGE_VENDOR "RawTherapee") | ||
set(CPACK_PACKAGE_INSTALL_DIRECTORY ${CPACK_PACKAGE_NAME}) | ||
set(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/LICENSE.txt") | ||
|
||
|
||
### versions | ||
set(CPACK_PACKAGE_VERSION ${PROJECT_VERSION}) | ||
|
||
|
||
### source generator | ||
set(CPACK_SOURCE_GENERATOR "TXZ") | ||
set(CPACK_SOURCE_IGNORE_FILES "~$;[.]swp$;/[.]svn/;/[.]git/;.gitignore;/obj*;tags;cscope.*;.ycm_extra_conf.pyc") | ||
set(CPACK_SOURCE_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}") | ||
|
||
if (WIN32) | ||
set(CPACK_GENERATOR "ZIP") | ||
|
||
### nsis generator | ||
find_package(NSIS) | ||
if (NSIS_MAKE) | ||
set(CPACK_GENERATOR "${CPACK_GENERATOR};NSIS") | ||
set(CPACK_NSIS_DISPLAY_NAME "CMocka") | ||
set(CPACK_NSIS_COMPRESSOR "/SOLID zlib") | ||
set(CPACK_NSIS_MENU_LINKS "https://github.com/CarVac/librtprocess" "librtprocess homepage") | ||
endif (NSIS_MAKE) | ||
endif (WIN32) | ||
|
||
set(CPACK_PACKAGE_INSTALL_DIRECTORY "rtprocess") | ||
|
||
set(CPACK_PACKAGE_FILE_NAME ${PROJECT_NAME}-${CPACK_PACKAGE_VERSION}) | ||
|
||
set(CPACK_COMPONENT_LIBRARIES_DISPLAY_NAME "Libraries") | ||
set(CPACK_COMPONENT_HEADERS_DISPLAY_NAME "C/C++ Headers") | ||
set(CPACK_COMPONENT_LIBRARIES_DESCRIPTION | ||
"Libraries used to build programs which use rtprocess") | ||
set(CPACK_COMPONENT_HEADERS_DESCRIPTION | ||
"C/C++ header files for use with rtprocess") | ||
set(CPACK_COMPONENT_HEADERS_DEPENDS libraries) | ||
set(CPACK_COMPONENT_LIBRARIES_GROUP "Development") | ||
set(CPACK_COMPONENT_HEADERS_GROUP "Development") | ||
|
||
include(CPack) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
# - Try to find NSIS | ||
# Once done this will define | ||
# | ||
# NSIS_ROOT_PATH - Set this variable to the root installation of NSIS | ||
# | ||
# Read-Only variables: | ||
# | ||
# NSIS_FOUND - system has NSIS | ||
# NSIS_MAKE - NSIS creator executable | ||
# | ||
#============================================================================= | ||
# Copyright (c) 2010-2013 Andreas Schneider <asn@cryptomilk.org> | ||
# | ||
# Distributed under the OSI-approved BSD License (the "License"); | ||
# see accompanying file Copyright.txt for details. | ||
# | ||
# This software is distributed WITHOUT ANY WARRANTY; without even the | ||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | ||
# See the License for more information. | ||
#============================================================================= | ||
# | ||
|
||
if (WIN32) | ||
set(_x86 "(x86)") | ||
|
||
set(_NSIS_ROOT_PATHS | ||
"$ENV{ProgramFiles}/NSIS" | ||
"$ENV{ProgramFiles${_x86}}/NSIS" | ||
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\NSIS;Default]") | ||
|
||
find_path(NSIS_ROOT_PATH | ||
NAMES | ||
Include/Library.nsh | ||
PATHS | ||
${_NSIS_ROOT_PATHS} | ||
) | ||
mark_as_advanced(NSIS_ROOT_PATH) | ||
endif (WIN32) | ||
|
||
find_program(NSIS_MAKE | ||
NAMES | ||
makensis | ||
PATHS | ||
${NSIS_ROOT_PATH} | ||
) | ||
|
||
include(FindPackageHandleStandardArgs) | ||
find_package_handle_standard_args(NSIS DEFAULT_MSG NSIS_MAKE) | ||
|
||
if (NSIS_MAKE) | ||
set(NSIS_FOUND TRUE) | ||
endif (NSIS_MAKE) | ||
|
||
mark_as_advanced(NSIS_MAKE) |