Skip to content

Commit

Permalink
CMake|Unix|Fixed: Incorrect build options; no default CPack generator
Browse files Browse the repository at this point in the history
When including GNUInstallDirs, the install prefix must already be set.

The appropriate CPack generator depends on the system doing the building,
so it should be manually set if needed. (Debian/Fedora have different
multiarch conventions.)
  • Loading branch information
skyjake committed May 24, 2015
1 parent 63b67f8 commit ded134c
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 4 additions & 0 deletions doomsday/cmake/Config.cmake
Expand Up @@ -32,6 +32,10 @@ find_package (Ccache)
include (Options)
include (Packaging)

if (UNIX AND NOT APPLE)
include (GNUInstallDirs)
endif()

# Install directories.
set (DENG_INSTALL_DATA_DIR "share/doomsday")
set (DENG_INSTALL_DOC_DIR "share/doc")
Expand Down
4 changes: 0 additions & 4 deletions doomsday/cmake/InstallPrefix.cmake
@@ -1,7 +1,3 @@
if (UNIX AND NOT APPLE)
include (GNUInstallDirs)
endif()

set (_oldPrefix ${CMAKE_INSTALL_PREFIX})

# Install destination. PREFIX can be used to set the location manually.
Expand Down
3 changes: 2 additions & 1 deletion doomsday/cmake/Packaging.cmake
Expand Up @@ -40,7 +40,8 @@ if (APPLE)
set (CPACK_GENERATOR DragNDrop)
set (CPACK_DMG_FORMAT UDZO)
elseif (UNIX)
set (CPACK_GENERATOR RPM;DEB)
#set (CPACK_GENERATOR RPM;DEB)
# Set CPACK_GENERATOR manually.
set (CPACK_PROJECT_CONFIG_FILE ${CMAKE_CURRENT_LIST_DIR}/PackagingUnix.cmake)
else ()
set (CPACK_GENERATOR WIX)
Expand Down

0 comments on commit ded134c

Please sign in to comment.