64 lines
1.2 KiB
CMake
64 lines
1.2 KiB
CMake
# Copyright (c) 2025 Dominic Masters
|
|
#
|
|
# This software is released under the MIT License.
|
|
# https://opensource.org/licenses/MIT
|
|
|
|
find_package(cglm REQUIRED)
|
|
find_package(libzip REQUIRED)
|
|
find_package(Lua REQUIRED)
|
|
|
|
if(Lua_FOUND AND NOT TARGET Lua::Lua)
|
|
add_library(Lua::Lua INTERFACE IMPORTED)
|
|
set_target_properties(
|
|
Lua::Lua
|
|
PROPERTIES
|
|
INTERFACE_INCLUDE_DIRECTORIES "${LUA_INCLUDE_DIR}"
|
|
INTERFACE_LINK_LIBRARIES "${LUA_LIBRARIES}"
|
|
)
|
|
endif()
|
|
|
|
# Libs
|
|
target_link_libraries(${DUSK_TARGET_NAME}
|
|
PUBLIC
|
|
m
|
|
cglm
|
|
zip
|
|
pthread
|
|
Lua::Lua
|
|
)
|
|
|
|
# Includes
|
|
target_include_directories(${DUSK_TARGET_NAME}
|
|
PRIVATE
|
|
${CMAKE_CURRENT_LIST_DIR}
|
|
)
|
|
|
|
# Sources
|
|
target_sources(${DUSK_TARGET_NAME}
|
|
PRIVATE
|
|
main.c
|
|
)
|
|
|
|
# Defs
|
|
add_defs(duskdefs.env duskdefs.h)
|
|
target_compile_definitions(${DUSK_TARGET_NAME}
|
|
PRIVATE
|
|
DUSK_TARGET_SYSTEM="${DUSK_TARGET_SYSTEM}"
|
|
)
|
|
|
|
# Subdirs
|
|
add_subdirectory(assert)
|
|
add_subdirectory(asset)
|
|
add_subdirectory(debug)
|
|
add_subdirectory(display)
|
|
add_subdirectory(engine)
|
|
add_subdirectory(error)
|
|
add_subdirectory(input)
|
|
add_subdirectory(locale)
|
|
add_subdirectory(rpg)
|
|
add_subdirectory(scene)
|
|
add_subdirectory(script)
|
|
add_subdirectory(thread)
|
|
add_subdirectory(time)
|
|
add_subdirectory(ui)
|
|
add_subdirectory(util) |