voxelotl-engine/Sources/Voxelotl/CMakeLists.txt

112 lines
3.4 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-09-02 09:13:29 +00:00
# Common utility library
2024-09-02 02:30:47 +00:00
Common/ConcurrentDictionary.swift
2024-09-02 09:13:29 +00:00
Common/Color.swift
Common/FPSCalculator.swift
2024-09-02 02:30:47 +00:00
2024-08-21 20:24:30 +00:00
# Maths library
Math/FloatExtensions.swift
2024-08-29 15:58:52 +00:00
Math/IntegerExtensions.swift
2024-08-21 20:24:30 +00:00
Math/VectorExtensions.swift
Math/Matrix4x4.swift
2024-08-28 06:22:20 +00:00
Math/Point.swift
Math/Size.swift
2024-08-21 20:24:30 +00:00
Math/Rectangle.swift
2024-08-28 06:22:20 +00:00
Math/Extent.swift
2024-08-21 20:24:30 +00:00
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-31 16:09:49 +00:00
Random/SplitMix64.swift
2024-09-02 16:57:29 +00:00
Random/RandomCollectionExtensions.swift
# Coherent noise classes
Noise/CoherentNoise.swift
Noise/PerlinNoiseGenerator.swift
Noise/SimplexNoise.swift
2024-08-21 17:09:53 +00:00
2024-08-21 20:24:30 +00:00
# Resource classes
2024-09-02 09:13:29 +00:00
Resource/NSImageLoader.swift
2024-08-21 20:24:30 +00:00
# Renderer classes
Renderer/Material.swift
Renderer/Environment.swift
2024-09-01 11:16:05 +00:00
Renderer/Mesh.swift
Renderer/Renderer.swift
2024-08-24 03:52:32 +00:00
# Input wrappers
Input/Keyboard.swift
Input/GameController.swift
Input/Mouse.swift
2024-08-21 20:24:30 +00:00
# Game logic classes
Chunk.swift
2024-08-30 11:56:39 +00:00
WorldGenerator.swift
2024-09-02 09:13:29 +00:00
CubeMeshBuilder.swift
2024-09-01 13:34:32 +00:00
ChunkMeshBuilder.swift
2024-08-25 09:23:47 +00:00
World.swift
2024-08-23 11:02:00 +00:00
Raycast.swift
2024-09-02 09:13:29 +00:00
Camera.swift
2024-08-21 20:24:30 +00:00
Player.swift
2024-08-12 22:38:21 +00:00
Game.swift
2024-09-02 09:13:29 +00:00
# Core application classes
GameDelegate.swift
Application.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)
2024-08-25 09:23:47 +00:00
target_compile_definitions(Voxelotl PRIVATE $<$<CONFIG:Debug>:DEBUG>)
2024-08-05 00:42:03 +00:00
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-09-02 02:30:47 +00:00
source_group("Source Files\\Common" REGULAR_EXPRESSION "Common/")
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/")
2024-08-24 03:52:32 +00:00
source_group("Source Files\\Input" REGULAR_EXPRESSION "Input/")
source_group("Source Files\\Renderer" REGULAR_EXPRESSION "Renderer/")