Files
voxelotl-engine/Sources/Voxelotl/CMakeLists.txt

95 lines
3.0 KiB
CMake
Raw Normal View History

2024-08-05 11:28:34 +10:00
add_executable(Voxelotl MACOSX_BUNDLE
2024-08-22 06:24:30 +10:00
# Resources
2024-08-04 20:29:16 -07:00
Assets.xcassets
2024-08-05 20:09:33 +10:00
test.png
2024-08-22 06:24:30 +10:00
# Shaders
2024-08-05 20:09:33 +10:00
shadertypes.h
shader.metal
2024-08-22 06:24:30 +10:00
# Maths library
Math/FloatExtensions.swift
Math/VectorExtensions.swift
Math/Matrix4x4.swift
Math/Rectangle.swift
Math/AABB.swift
2024-08-06 17:35:38 +10:00
2024-08-22 06:24:30 +10:00
# Random number generator subsystem
2024-08-22 03:09:53 +10:00
Random/RandomProvider.swift
Random/RandomRange.swift
2024-08-22 03:09:53 +10:00
Random/Arc4Random.swift
Random/PCG32Random.swift
Random/Xoroshiro128.swift
2024-08-23 16:55:59 +10:00
Random/PerlinNoiseGenerator.swift
Random/RandomCollectionExtensions.swift
2024-08-22 03:09:53 +10:00
2024-08-22 06:24:30 +10:00
# Resource classes
2024-08-05 20:09:33 +10:00
NSImageLoader.swift
2024-08-22 06:24:30 +10:00
# Renderer classes
Renderer/Material.swift
Renderer/Environment.swift
Renderer/Renderer.swift
2024-08-24 13:52:32 +10:00
# Input wrappers
Input/Keyboard.swift
Input/GameController.swift
Input/Mouse.swift
2024-08-22 06:24:30 +10:00
# Core utility classes
Color.swift
Camera.swift
2024-08-22 03:09:53 +10:00
FPSCalculator.swift
2024-08-13 08:38:21 +10:00
GameDelegate.swift
2024-08-05 11:28:34 +10:00
Application.swift
2024-08-13 08:38:21 +10:00
2024-08-22 06:24:30 +10:00
# Game logic classes
Chunk.swift
2024-08-25 19:23:47 +10:00
World.swift
2024-08-23 21:02:00 +10:00
Raycast.swift
2024-08-22 06:24:30 +10:00
Player.swift
2024-08-13 08:38:21 +10:00
Game.swift
2024-08-05 20:09:33 +10:00
main.swift)
2024-08-05 00:08:16 -07:00
set_source_files_properties(
shader.metal PROPERTIES
LANGUAGE METAL
COMPILE_OPTIONS "-I${PROJECT_SOURCE_DIR}"
)
2024-08-05 11:28:34 +10:00
2024-08-05 00:19:49 -07:00
target_include_directories(Voxelotl PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}")
2024-08-04 17:42:03 -07:00
target_link_libraries(Voxelotl PRIVATE SDLSwift)
2024-08-25 19:23:47 +10:00
target_compile_definitions(Voxelotl PRIVATE $<$<CONFIG:Debug>:DEBUG>)
2024-08-04 17:42:03 -07:00
set_target_properties(Voxelotl PROPERTIES
2024-08-04 18:36:35 -07:00
XCODE_ATTRIBUTE_ENABLE_HARDENED_RUNTIME YES
XCODE_ATTRIBUTE_PRODUCT_BUNDLE_IDENTIFIER "gay.pizza.voxelotl"
2024-08-04 17:42:03 -07: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-04 18:06:13 -07:00
MACOSX_BUNDLE_BUNDLE_VERSION "${PROJECT_VERSION}"
MACOSX_BUNDLE_SHORT_VERSION_STRING "${PROJECT_VERSION}"
2024-08-04 17:42:03 -07:00
MACOSX_BUNDLE_GUI_IDENTIFIER "gay.pizza.voxelotl"
2024-08-04 18:45:25 -07:00
MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/Info.plist.in"
2024-08-04 20:29:16 -07:00
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME "AppIcon"
2024-08-04 17:42:03 -07: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-04 18:36:35 -07:00
XCODE_ATTRIBUTE_CODE_SIGN_ENTITLEMENTS "${CMAKE_CURRENT_SOURCE_DIR}/Voxelotl.entitlements"
2024-08-04 17:42:03 -07:00
MACOSX_BUNDLE_COPYRIGHT "© 2024 Gay Pizza Specifications")
2024-08-05 20:09:33 +10:00
set_source_files_properties(Assets.xcassets PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
2024-08-05 00:19:49 -07:00
set_source_files_properties(module.modulemap PROPERTIES MACOSX_PACKAGE_LOCATION Modules)
2024-08-05 20:09:33 +10:00
set_source_files_properties(test.png PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
2024-08-05 12:33:07 +10:00
2024-08-22 06:24:30 +10:00
#TODO: should use TREE mode as documented in https://cmake.org/cmake/help/latest/command/source_group.html
2024-08-05 20:09:33 +10:00
source_group("Resources" FILES Assets.xcassets test.png)
2024-08-05 00:08:16 -07:00
source_group("Source Files" REGULAR_EXPRESSION "\\.(swift|metal)$")
2024-08-22 03:09:53 +10:00
source_group("Source Files\\Random" REGULAR_EXPRESSION "Random/")
2024-08-22 06:24:30 +10:00
source_group("Source Files\\Math" REGULAR_EXPRESSION "Math/")
2024-08-24 13:52:32 +10:00
source_group("Source Files\\Input" REGULAR_EXPRESSION "Input/")
source_group("Source Files\\Renderer" REGULAR_EXPRESSION "Renderer/")