2021-01-02 09:43:43 +08:00
|
|
|
cmake_minimum_required(VERSION 3.6)
|
|
|
|
project(TinyLink)
|
|
|
|
|
|
|
|
# C++ version
|
|
|
|
set(CMAKE_CXX_STANDARD 17)
|
|
|
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
|
|
|
|
|
#include blah
|
|
|
|
add_subdirectory(libs/blah)
|
|
|
|
|
|
|
|
# add our source
|
|
|
|
add_executable(game
|
2021-01-03 05:51:50 +08:00
|
|
|
src/main.cpp
|
2021-01-03 08:20:01 +08:00
|
|
|
src/world.h
|
2021-01-02 11:47:19 +08:00
|
|
|
src/world.cpp
|
2021-01-03 08:20:01 +08:00
|
|
|
src/game.h
|
2021-01-03 05:51:50 +08:00
|
|
|
src/game.cpp
|
2021-01-03 08:20:01 +08:00
|
|
|
src/content.h
|
2021-01-03 05:51:50 +08:00
|
|
|
src/content.cpp
|
2021-01-03 08:20:01 +08:00
|
|
|
src/assets/sprite.h
|
|
|
|
src/assets/sprite.cpp
|
|
|
|
src/components/animator.h
|
|
|
|
src/components/animator.cpp
|
|
|
|
src/components/collider.h
|
|
|
|
src/components/collider.cpp
|
|
|
|
src/components/player.h
|
|
|
|
src/components/player.cpp
|
|
|
|
src/components/mover.h
|
|
|
|
src/components/mover.cpp
|
|
|
|
src/masks.h
|
2021-01-03 09:05:12 +08:00
|
|
|
src/factory.h
|
|
|
|
src/factory.cpp
|
2021-01-03 09:50:25 +08:00
|
|
|
"src/assets/tileset.h" "src/assets/tileset.cpp" "src/components/tilemap.h" "src/components/tilemap.cpp")
|
2021-01-02 09:43:43 +08:00
|
|
|
|
|
|
|
# Reference blah
|
|
|
|
target_link_libraries(game blah)
|
|
|
|
|
|
|
|
# copy SDL2 to the build directory
|
|
|
|
set(SDL2_DLL "" CACHE FILEPATH "SDL2 DLL Path")
|
|
|
|
if (SDL2_ENABLED)
|
|
|
|
add_custom_command(
|
|
|
|
TARGET game POST_BUILD
|
2021-01-02 11:47:19 +08:00
|
|
|
COMMAND ${CMAKE_COMMAND} -E copy ${SDL2_DLL} $<TARGET_FILE_DIR:game>)
|
2021-01-02 09:43:43 +08:00
|
|
|
endif()
|