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

135 lines
4.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-09-02 19:13:29 +10:00
# Common utility library
2024-09-01 22:30:47 -04:00
Common/ConcurrentDictionary.swift
2024-09-02 19:13:29 +10:00
Common/Color.swift
Common/FPSCalculator.swift
2024-09-01 22:30:47 -04:00
2024-08-22 06:24:30 +10:00
# Maths library
Math/FloatExtensions.swift
2024-08-30 01:58:52 +10:00
Math/IntegerExtensions.swift
2024-08-22 06:24:30 +10:00
Math/VectorExtensions.swift
Math/Matrix4x4.swift
2024-08-28 16:22:20 +10:00
Math/Point.swift
Math/Size.swift
2024-08-22 06:24:30 +10:00
Math/Rectangle.swift
2024-08-28 16:22:20 +10:00
Math/Extent.swift
2024-08-22 06:24:30 +10:00
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-09-01 02:09:49 +10:00
Random/SplitMix64.swift
2024-09-03 02:57:29 +10:00
Random/RandomCollectionExtensions.swift
# Coherent noise classes
Noise/CoherentNoise.swift
Noise/PerlinNoiseGenerator.swift
Noise/SimplexNoise.swift
2024-08-22 03:09:53 +10:00
2024-08-22 06:24:30 +10:00
# Resource classes
2024-09-02 19:13:29 +10:00
Resource/NSImageLoader.swift
2024-08-22 06:24:30 +10:00
# Renderer classes
Renderer/Material.swift
Renderer/Environment.swift
2024-09-01 21:16:05 +10:00
Renderer/Mesh.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
# Game logic classes
Chunk.swift
ChunkGeneration.swift
2024-09-03 09:48:29 -04:00
ChunkMeshGeneration.swift
2024-08-30 21:56:39 +10:00
WorldGenerator.swift
2024-09-02 19:13:29 +10:00
CubeMeshBuilder.swift
2024-09-01 23:34:32 +10:00
ChunkMeshBuilder.swift
2024-08-25 19:23:47 +10:00
World.swift
2024-08-23 21:02:00 +10:00
Raycast.swift
2024-09-02 19:13:29 +10:00
Camera.swift
2024-08-22 06:24:30 +10:00
Player.swift
2024-08-13 08:38:21 +10:00
Game.swift
2024-09-02 19:13:29 +10:00
# Core application classes
GameDelegate.swift
Application.swift
2024-09-03 05:00:28 -04:00
# Entry point
Program.swift
main.m
)
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>)
if(VOXELOTL_MOBILE_ENABLED)
set(VOXELOTL_APPICON "AppIconMobile")
set(VOXELOTL_RPATH "@loader_path/Frameworks")
else()
set(VOXELOTL_APPICON "AppIcon")
set(VOXELOTL_RPATH "@loader_path/../Frameworks")
endif()
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"
XCODE_ATTRIBUTE_ASSETCATALOG_COMPILER_APPICON_NAME "${VOXELOTL_APPICON}"
BUILD_RPATH "${VOXELOTL_RPATH}"
2024-08-04 17:42:03 -07:00
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
if(VOXELOTL_MOBILE_ENABLED)
set_target_properties(Voxelotl PROPERTIES
XCODE_ATTRIBUTE_CODE_SIGNING_REQUIRED "YES"
XCODE_ATTRIBUTE_CODE_SIGNING_ALLOWED "YES"
XCODE_ATTRIBUTE_TARGETED_DEVICE_FAMILY "1,2"
)
endif()
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-09-03 05:00:28 -04:00
source_group("Source Files" REGULAR_EXPRESSION "\\.(swift|metal|m)$")
2024-09-03 02:58:25 +10:00
source_group("Source Files\\Common" REGULAR_EXPRESSION "Common/")
2024-08-22 03:09:53 +10:00
source_group("Source Files\\Random" REGULAR_EXPRESSION "Random/")
2024-09-03 02:58:25 +10:00
source_group("Source Files\\Noise" REGULAR_EXPRESSION "Noise/")
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/")