102 lines
3.4 KiB
CMake
102 lines
3.4 KiB
CMake
# CMakeList.txt : CMake project for YuppleMayham, include source and define
|
|
# project specific logic here.
|
|
#
|
|
|
|
find_package(SDL2 2.30.2 REQUIRED)
|
|
find_package(SDL2_IMAGE 2.8.2 REQUIRED)
|
|
find_package(PkgConfig REQUIRED)
|
|
pkg_check_modules(LuaJIT REQUIRED IMPORTED_TARGET GLOBAL luajit)
|
|
find_package(sol2 REQUIRED)
|
|
find_package(tinyxml2 REQUIRED)
|
|
find_package(Freetype REQUIRED)
|
|
find_package(glm CONFIG REQUIRED)
|
|
|
|
|
|
#include_directories(SYSTEM "c:/sdks/glad/include")
|
|
#include_directories(SYSTEM "c:/sdks/tinyxml2-10.0.0/debug/include")
|
|
#include_directories(SYSTEM "c:/sdks/glm")
|
|
#include_directories(SYSTEM "C:/sdks/sol2-3.3.0/single/single/include")
|
|
#include_directories(SYSTEM "c:/sdks/lua-5.4.6/include")
|
|
#include_directories(SYSTEM "C:/sdks/freetype-2.13.2/include")
|
|
#link_directories(SYSTEM "C:/sdks/freetype-2.13.2/objs")
|
|
#if (CMAKE_BUILD_TYPE STREQUAL "Debug")
|
|
# link_directories(SYSTEM "c:/sdks/tinyxml2-10.0.0/debug/lib")
|
|
#else()
|
|
# link_directories(SYSTEM "c:/sdks/tinyxml2-10.0.0/release/lib")
|
|
#endif()
|
|
#link_directories(SYSTEM "c:/sdks/lua-5.4.6/lib")
|
|
|
|
#include_directories("${PROJECT_SOURCE_DIR}/YuppleMayham/include")
|
|
|
|
# Add source to this project's executable.
|
|
add_executable (YuppleMayham
|
|
"src/main.cpp"
|
|
"src/thirdparty/glad.c"
|
|
"src/utility/data/font_data.c"
|
|
"src/utility/ftfont.cpp"
|
|
"src/graphics/sprite.cpp"
|
|
"src/graphics/mesh.cpp"
|
|
"src/gameplay/entity.cpp"
|
|
"src/gameplay/gameactor.cpp"
|
|
"src/graphics/shader.cpp"
|
|
"src/util.cpp"
|
|
"src/gameplay/camera.cpp"
|
|
"src/utility/command.cpp"
|
|
"src/gameplay/input.cpp"
|
|
"src/gameplay/weapons/bullet.cpp"
|
|
"src/gameplay/weapons/bulletmanager.cpp"
|
|
"src/gameplay/scene.cpp"
|
|
"src/graphics/texture.cpp"
|
|
|
|
"src/utility/resourcemanager.cpp"
|
|
"src/utility/xmlloader.cpp"
|
|
"src/gameplay/game.cpp"
|
|
"src/graphics/instancedraw.cpp"
|
|
"src/gameplay/map.cpp"
|
|
"src/gameplay/weapons/weapon.cpp"
|
|
"src/gameplay/physics.cpp"
|
|
"src/utility/debugdraw.cpp"
|
|
"src/utility/script.cpp"
|
|
"src/gameplay/ai.cpp"
|
|
"include/graphics/glwindow.h"
|
|
"include/gameplay/camera.h"
|
|
"include/utility/mousestate.h"
|
|
"include/gameplay/weapons/bulletmanager.h"
|
|
"include/gameplay/scene.h"
|
|
|
|
"include/graphics/texture.h"
|
|
"src/graphics/quad.cpp"
|
|
|
|
"include/utility/resourcemanager.h"
|
|
"include/utility/xmlloader.h"
|
|
"include/gameplay/game.h"
|
|
"include/gameplay/map.h"
|
|
"include/gameplay/physics.h"
|
|
"include/utility/events.h"
|
|
"include/utility/debugdraw.h"
|
|
"include/utility/script.h"
|
|
"include/gameplay/ai.h"
|
|
"include/utility/raycaster.h"
|
|
"include/utility/ftfont.h"
|
|
"include/utility/direction.h"
|
|
"include/graphics/animation.h"
|
|
"src/graphics/animation.cpp"
|
|
"include/utility/logger.h"
|
|
"src/utility/logger.cpp"
|
|
"include/graphics/renderer.h"
|
|
"src/graphics/renderer.cpp"
|
|
"src/graphics/postprocess.cpp"
|
|
)
|
|
|
|
add_custom_command(TARGET YuppleMayham PRE_BUILD COMMAND ${CMAKE_COMMAND} -E copy_directory ${CMAKE_SOURCE_DIR}/Resources/ $<TARGET_FILE_DIR:YuppleMayham>)
|
|
|
|
if (CMAKE_VERSION VERSION_GREATER 3.12)
|
|
set_property(TARGET YuppleMayham PROPERTY CXX_STANDARD 20)
|
|
message("this is freetype include dirs: ${FREETYPE_INCLUDE_DIR_ft2build}")
|
|
endif()
|
|
|
|
target_include_directories(YuppleMayham PRIVATE "${PROJECT_SOURCE_DIR}/YuppleMayham/include" ${LuaJIT_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIR_ft2build})
|
|
|
|
target_link_libraries(YuppleMayham SDL2::SDL2main SDL2::SDL2 SDL2_image::SDL2_image glm::glm-header-only sol2 tinyxml2 freetype ${LuaJIT_LINK_LIBRARIES})
|
|
|
|
# TODO: Add tests and install targets if needed.
|