67 lines
1.5 KiB
CMake
67 lines
1.5 KiB
CMake
# Copyright (c) 2025 Dominic Masters
|
|
#
|
|
# This software is released under the MIT License.
|
|
# https://opensource.org/licenses/MIT
|
|
|
|
# Required Libraries
|
|
if(NOT cglm_FOUND)
|
|
find_package(cglm REQUIRED)
|
|
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC cglm)
|
|
endif()
|
|
|
|
if(NOT libzip_FOUND)
|
|
find_package(libzip REQUIRED)
|
|
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC zip)
|
|
endif()
|
|
|
|
if(NOT Lua_FOUND)
|
|
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()
|
|
target_link_libraries(${DUSK_LIBRARY_TARGET_NAME} PUBLIC Lua::Lua)
|
|
endif()
|
|
|
|
# Includes
|
|
target_include_directories(${DUSK_LIBRARY_TARGET_NAME}
|
|
PUBLIC
|
|
${CMAKE_CURRENT_LIST_DIR}
|
|
)
|
|
|
|
# Main Binary Source
|
|
target_sources(${DUSK_BINARY_TARGET_NAME}
|
|
PUBLIC
|
|
main.c
|
|
)
|
|
|
|
# Defs
|
|
dusk_env_to_h(duskdefs.env duskdefs.h)
|
|
|
|
# Subdirs
|
|
add_subdirectory(assert)
|
|
add_subdirectory(asset)
|
|
add_subdirectory(debug)
|
|
add_subdirectory(display)
|
|
add_subdirectory(engine)
|
|
add_subdirectory(error)
|
|
add_subdirectory(event)
|
|
add_subdirectory(input)
|
|
add_subdirectory(item)
|
|
add_subdirectory(locale)
|
|
add_subdirectory(map)
|
|
add_subdirectory(scene)
|
|
add_subdirectory(script)
|
|
add_subdirectory(story)
|
|
add_subdirectory(time)
|
|
add_subdirectory(ui)
|
|
add_subdirectory(util)
|
|
|
|
# if(DUSK_TARGET_SYSTEM STREQUAL "linux" OR DUSK_TARGET_SYSTEM STREQUAL "psp")
|
|
# add_subdirectory(thread)
|
|
# endif() |