voxelotl-engine/Sources/Voxelotl/CMakeLists.txt

81 lines
2.5 KiB
CMake
Raw Normal View History

2024-08-05 01:28:34 +00:00
add_executable(Voxelotl MACOSX_BUNDLE
2024-08-21 20:24:30 +00:00
# Resources
2024-08-05 03:29:16 +00:00
Assets.xcassets
2024-08-05 10:09:33 +00:00
test.png
2024-08-21 20:24:30 +00:00
# Shaders
2024-08-05 10:09:33 +00:00
shadertypes.h
shader.metal
2024-08-21 20:24:30 +00:00
# Maths library
Math/FloatExtensions.swift
Math/VectorExtensions.swift
Math/Matrix4x4.swift
Math/Rectangle.swift
Math/AABB.swift
2024-08-06 07:35:38 +00:00
2024-08-21 20:24:30 +00:00
# Random number generator subsystem
2024-08-21 17:09:53 +00:00
Random/RandomProvider.swift
Random/RandomRange.swift
2024-08-21 17:09:53 +00:00
Random/Arc4Random.swift
Random/PCG32Random.swift
Random/Xoroshiro128.swift
2024-08-21 17:09:53 +00:00
2024-08-21 20:24:30 +00:00
# Resource classes
2024-08-05 10:09:33 +00:00
NSImageLoader.swift
2024-08-21 20:24:30 +00:00
# Core utility classes
Color.swift
Camera.swift
2024-08-05 05:44:51 +00:00
Renderer.swift
Keyboard.swift
GameController.swift
2024-08-21 17:09:53 +00:00
FPSCalculator.swift
2024-08-12 22:38:21 +00:00
GameDelegate.swift
2024-08-05 01:28:34 +00:00
Application.swift
2024-08-12 22:38:21 +00:00
2024-08-21 20:24:30 +00:00
# Game logic classes
Chunk.swift
Player.swift
2024-08-12 22:38:21 +00:00
Game.swift
2024-08-05 10:09:33 +00:00
main.swift)
2024-08-05 07:08:16 +00:00
set_source_files_properties(
shader.metal PROPERTIES
LANGUAGE METAL
COMPILE_OPTIONS "-I${PROJECT_SOURCE_DIR}"
)
2024-08-05 01:28:34 +00:00
2024-08-05 07:19:49 +00:00
target_include_directories(Voxelotl PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
2024-08-05 00:42:03 +00:00
target_link_libraries(Voxelotl PRIVATE SDLSwift)
set_target_properties(Voxelotl PROPERTIES
2024-08-05 01:36:35 +00:00
XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME YES
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "gay.pizza.voxelotl"
2024-08-05 00:42:03 +00:00
XCODE_EMBED_FRAMEWORKS "${SDL3}"
XCODE_EMBED_FRAMEWORKS_REMOVE_HEADERS_ON_COPY YES
XCODE_EMBED_FRAMEWORKS_CODE_SIGN_ON_COPY YES
MACOSX_BUNDLE_BUNDLE_NAME "Voxelotl"
2024-08-05 01:06:13 +00:00
MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}"
MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}"
2024-08-05 00:42:03 +00:00
MACOSX_BUNDLE_GUI_IDENTIFIER "gay.pizza.voxelotl"
2024-08-05 01:45:25 +00:00
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in"
2024-08-05 03:29:16 +00:00
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon"
2024-08-05 00:42:03 +00:00
BUILD_RPATH "@loader_path/../Frameworks"
XCODE_ATTRIBUTE_SKIP_INSTALL "NO"
XCODE_ATTRIBUTE_INSTALL_PATH "$(LOCAL_APPS_DIR)"
XCODE_GENERATE_SCHEME ON
XCODE_SCHEME_ENABLE_GPU_FRAME_CAPTURE_MODE "Metal"
2024-08-05 01:36:35 +00:00
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/Voxelotl.entitlements"
2024-08-05 00:42:03 +00:00
MACOSX_BUNDLE_COPYRIGHT "© 2024 Gay Pizza Specifications")
2024-08-05 10:09:33 +00:00
set_source_files_properties(Assets.xcassets PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
2024-08-05 07:19:49 +00:00
set_source_files_properties(module.modulemap PROPERTIES MACOSX_PACKAGE_LOCATION Modules)
2024-08-05 10:09:33 +00:00
set_source_files_properties(test.png PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
2024-08-05 02:33:07 +00:00
2024-08-21 20:24:30 +00:00
#TODO: should use TREE mode as documented in https://cmake.org/cmake/help/latest/command/source_group.html
2024-08-05 10:09:33 +00:00
source_group("Resources" FILES Assets.xcassets test.png)
2024-08-05 07:08:16 +00:00
source_group("Source Files" REGULAR_EXPRESSION "\\.(swift|metal)$")
2024-08-21 17:09:53 +00:00
source_group("Source Files\\Random" REGULAR_EXPRESSION "Random/")
2024-08-21 20:24:30 +00:00
source_group("Source Files\\Math" REGULAR_EXPRESSION "Math/")