Add WITH_CLUB_FANTASTIC build option

This commit is contained in:
Martin Natano
2022-06-11 13:43:03 +02:00
parent d41e2b0c7d
commit 64b4676a14
6 changed files with 34 additions and 9 deletions
+18 -1
View File
@@ -15,6 +15,7 @@ set(CPACK_RESOURCE_FILE_LICENSE "${SM_CMAKE_DIR}/license_install.txt")
if(WIN32)
set(CPACK_GENERATOR NSIS)
set(CPACK_SYSTEM_NAME "Windows")
# By setting these install keys manually, The default directory of "StepMania
# major.minor.patch" is lost. This is currently done to maintain backwards
@@ -57,8 +58,24 @@ elseif(MACOSX)
set(CPACK_GENERATOR DragNDrop)
set(CPACK_DMG_VOLUME_NAME "${CPACK_PACKAGE_NAME} ${CPACK_PACKAGE_VERSION}")
set(CPACK_DMG_FORMAT ULMO) # lzma-compressed image
if(CMAKE_OSX_ARCHITECTURES STREQUAL "arm64")
set(CPACK_SYSTEM_NAME "macOS-M1")
elseif(CMAKE_OSX_ARCHITECTURES STREQUAL "x86_64")
set(CPACK_SYSTEM_NAME "macOS-Intel")
else()
message(FATAL_ERROR
"Unsupported macOS architecture: ${CMAKE_OSX_ARCHITECTURES}, set CMAKE_OSX_ARCHITECTURES to either arm64 or x86_64"
)
endif()
else()
set(CPACK_GENERATOR TGZ TXZ STGZ)
set(CPACK_GENERATOR TGZ)
set(CPACK_SYSTEM_NAME "Linux")
endif()
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${CPACK_PACKAGE_VERSION}-${CPACK_SYSTEM_NAME}")
if(NOT WITH_CLUB_FANTASTIC)
set(CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_FILE_NAME}-no-songs")
endif()
include(CPack)
+3
View File
@@ -15,6 +15,9 @@ option(WITH_SSE2 "Build with SSE2 Optimizations." ON)
# Turn this on to set this to a specific release mode.
option(WITH_FULL_RELEASE "Build as a proper, full release." OFF)
# Turn this on to include Club Fantastic songs
option(WITH_CLUB_FANTASTIC "Include Club Fantastic songs." OFF)
# Turn this on to compile tomcrypt with no assembly data. This is a portable
# mode.
option(WITH_PORTABLE_TOMCRYPT
+3 -1
View File
@@ -6,9 +6,11 @@ cd "$(dirname $0)"
docker build -f Dockerfile-linux-amd64 . -t itgmania-linux-build:amd64
docker run -i -v $(pwd)/..:/data itgmania-linux-build:amd64 sh -eux <<'EOF'
cmake -S /data -B /tmp/Build -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On
cmake -S /data -B /tmp/Build -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DWITH_CLUB_FANTASTIC=On
cmake --build /tmp/Build -j $(nproc)
cmake --build /tmp/Build --target package
cmake -S /data -B /tmp/Build -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DWITH_CLUB_FANTASTIC=Off
cmake --build /tmp/Build --target package
mkdir -p /data/Build/release
cp /tmp/Build/ITGmania-* /data/Build/release/
EOF
+6 -2
View File
@@ -3,10 +3,14 @@ set -eux
cd "$(dirname $0)/.."
cmake -B Build/release-arm64 -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DCMAKE_OSX_ARCHITECTURES=arm64
cmake -B Build/release-arm64 -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DCMAKE_OSX_ARCHITECTURES=arm64 -DWITH_CLUB_FANTASTIC=On
cmake --build Build/release-arm64 -j $(sysctl -n hw.logicalcpu)
cmake --build Build/release-arm64 --target package
cmake -B Build/release-arm64 -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DCMAKE_OSX_ARCHITECTURES=arm64 -DWITH_CLUB_FANTASTIC=Off
cmake --build Build/release-arm64 --target package
cmake -B Build/release-x86_64 -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DCMAKE_OSX_ARCHITECTURES=x86_64
cmake -B Build/release-x86_64 -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DCMAKE_OSX_ARCHITECTURES=x86_64 -DWITH_CLUB_FANTASTIC=On
cmake --build Build/release-x86_64 -j $(sysctl -n hw.logicalcpu)
cmake --build Build/release-x86_64 --target package
cmake -B Build/release-x86_64 -DCMAKE_BUILD_TYPE=Release -DWITH_FULL_RELEASE=On -DCMAKE_OSX_ARCHITECTURES=x86_64 -DWITH_CLUB_FANTASTIC=Off
cmake --build Build/release-x86_64 --target package
+3 -1
View File
@@ -1,5 +1,7 @@
cd %~dp0..
cmake -B Build\release -DWITH_FULL_RELEASE=On || exit /b
cmake -B Build\release -DWITH_FULL_RELEASE=On -DWITH_CLUB_FANTASTIC=On || exit /b
cmake --build Build\release --config Release -j %NUMBER_OF_PROCESSORS% || exit /b
cmake --build Build\release --config Release --target package || exit /b
cmake -B Build\release -DWITH_FULL_RELEASE=On -DWITH_CLUB_FANTASTIC=Off || exit /b
cmake --build Build\release --config Release --target package || exit /b
+1 -4
View File
@@ -507,7 +507,7 @@ install(DIRECTORY "${SM_ROOT_DIR}/NoteSkins"
install(FILES "${SM_ROOT_DIR}/Songs/instructions.txt"
DESTINATION "${SM_INSTALL_DESTINATION}/Songs")
if(WITH_FULL_RELEASE)
if(WITH_CLUB_FANTASTIC)
# Fetch ClubFantastic packs
include(FetchContent)
FetchContent_Declare(
@@ -522,7 +522,4 @@ if(WITH_FULL_RELEASE)
DESTINATION "${SM_INSTALL_DESTINATION}/Songs")
install(DIRECTORY "${CLUB_FANTASTIC_DIR}/Club Fantastic Season 2"
DESTINATION "${SM_INSTALL_DESTINATION}/Songs")
else()
install(DIRECTORY "${SM_ROOT_DIR}/Songs/StepMania 5"
DESTINATION "${SM_INSTALL_DESTINATION}/Songs")
endif()