2021-01-04 16:37:09 +08:00
|
|
|
cmake_minimum_required(VERSION 3.12)
|
2021-01-02 09:43:43 +08:00
|
|
|
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-02 11:47:19 +08:00
|
|
|
src/world.cpp
|
2021-01-03 05:51:50 +08:00
|
|
|
src/game.cpp
|
|
|
|
src/content.cpp
|
2021-01-04 10:55:56 +08:00
|
|
|
src/factory.cpp
|
2021-01-03 08:20:01 +08:00
|
|
|
src/assets/sprite.cpp
|
2021-01-04 10:55:56 +08:00
|
|
|
src/assets/tileset.cpp
|
2021-01-03 08:20:01 +08:00
|
|
|
src/components/animator.cpp
|
|
|
|
src/components/collider.cpp
|
|
|
|
src/components/player.cpp
|
|
|
|
src/components/mover.cpp
|
2021-01-04 10:55:56 +08:00
|
|
|
src/components/tilemap.cpp
|
|
|
|
src/components/hurtable.cpp
|
|
|
|
src/components/timer.cpp
|
2021-01-06 12:48:25 +08:00
|
|
|
src/components/ghost_frog.cpp
|
|
|
|
src/components/orb.cpp
|
|
|
|
)
|
2021-01-02 09:43:43 +08:00
|
|
|
|
|
|
|
# Reference blah
|
|
|
|
target_link_libraries(game blah)
|
|
|
|
|
2021-01-04 17:22:39 +08:00
|
|
|
if( ${CMAKE_SYSTEM_NAME} MATCHES "Emscripten")
|
2021-01-06 12:48:25 +08:00
|
|
|
set_target_properties(game PROPERTIES LINK_FLAGS "-s USE_SDL=2 -s USE_WEBGL2=1 --preload-file ${CMAKE_SOURCE_DIR}/content@/content")
|
2021-01-04 17:22:39 +08:00
|
|
|
set(CMAKE_EXECUTABLE_SUFFIX ".html")
|
2022-02-13 05:03:02 +08:00
|
|
|
endif()
|