Skip to content

Commit

Permalink
wip: CMake update
Browse files Browse the repository at this point in the history
  • Loading branch information
aufau committed Sep 14, 2024
1 parent 9cc9fb1 commit ecfd57f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
13 changes: 6 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
cmake_minimum_required(VERSION 3.1.0)

project("JK2MV" HOMEPAGE_URL "https://jk2mv.org" LANGUAGES C CXX)

# Link directly against libGL.so instead of using GLVND
if (${CMAKE_VERSION} VERSION_GREATER "3.11")
cmake_policy(SET CMP0072 OLD)
Expand All @@ -19,9 +21,6 @@ list(INSERT CMAKE_MODULE_PATH 0 "${RESDir}")
# Project & Versioning
set_property(GLOBAL PROPERTY USE_FOLDERS ON)

set(ProjectName "JK2MV" CACHE STRING "Project Name")
set(ProjectURL "https://jk2mv.org")
project(${ProjectName})

include(GetGitRevisionDescription)
git_describe(MV_VERSION --tags)
Expand Down Expand Up @@ -357,7 +356,7 @@ endif()
add_subdirectory(libs/mongoose)

# Package
set(CPACK_PACKAGE_NAME ${ProjectName})
set(CPACK_PACKAGE_NAME ${PROJECT_NAME})
set(CPACK_PACKAGE_FILE_NAME "jk2mv-v${MV_VERSION}")
set(CPACK_PACKAGE_VENDOR "jk2mv.org")
set(CPACK_PACKAGE_CONTACT "jk2mv.org <[email protected]>")
Expand All @@ -375,7 +374,7 @@ if(WIN32)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-installer")

set(CPACK_GENERATOR "NSIS")
set(CPACK_NSIS_URL_INFO_ABOUT ${ProjectURL})
set(CPACK_NSIS_URL_INFO_ABOUT CMAKE_PROJECT_HOMEPAGE_URL)

configure_file(
${RESDir}/NSIS.definitions.nsh.in
Expand Down Expand Up @@ -405,14 +404,14 @@ else()
set(CPACK_GENERATOR ${CPACK_GENERATOR} "DEB")
set(CPACK_DEBIAN_PACKAGE_NAME "jk2mv") # debian packages are lowercase
set(CPACK_DEBIAN_PACKAGE_SECTION "games")
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${ProjectURL})
set(CPACK_DEBIAN_PACKAGE_HOMEPAGE ${PROJECT_HOMEPAGE_URL})
set(CPACK_DEBIAN_PACKAGE_ARCHITECTURE ${Architecture})
set(CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON)

set(CPACK_GENERATOR ${CPACK_GENERATOR} "RPM")
set(CPACK_RPM_PACKAGE_NAME "jk2mv")
set(CPACK_RPM_PACKAGE_DESCRIPTION "JK2MV (Multi Version) is a modification for Jedi Knight II: Jedi Outcast. It supports all three game versions and comes with various features and optimizations.")
set(CPACK_RPM_PACKAGE_URL ${ProjectURL})
set(CPACK_RPM_PACKAGE_URL ${PROJECT_HOMEPAGE_URL})
set(CPACK_RPM_PACKAGE_LICENSE "GPLv2")
set(CPACK_RPM_PACKAGE_GROUP "Amusements/Games")
set(CPACK_RPM_EXCLUDE_FROM_AUTO_FILELIST_ADDITION
Expand Down
4 changes: 2 additions & 2 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -449,8 +449,8 @@ if (BuildMVMP)
if(WIN32)
add_executable(${MVMP} WIN32 ${MVMPFiles})
elseif(APPLE AND NOT BuildPortableVersion)
set(MACOSX_BUNDLE_BUNDLE_NAME ${ProjectName})
set(MACOSX_BUNDLE_DISPLAY_NAME ${ProjectName})
set(MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME})
set(MACOSX_BUNDLE_DISPLAY_NAME ${PROJECT_NAME})
set(MACOSX_BUNDLE_ICON_FILE "mv.icns")
set(MVMPFiles ${MVMPFiles} ${RESDir}/mv.icns)

Expand Down

0 comments on commit ecfd57f

Please sign in to comment.