breakhack/CMakeLists.txt

50 lines
737 B
CMake
Raw Normal View History

2017-11-30 21:00:47 +01:00
cmake_minimum_required (VERSION 3.2.0)
SET(CMAKE_COLOR_MAKEFILE ON)
project(breakhack C)
2017-12-05 12:40:37 +01:00
include(FindLua)
2017-11-30 21:00:47 +01:00
add_subdirectory(linkedlist)
2017-12-05 12:40:37 +01:00
include_directories(linkedlist
2017-12-05 12:51:09 +01:00
${LUA_INCLUDE_DIR}
2017-12-05 12:40:37 +01:00
)
2017-11-30 21:00:47 +01:00
add_definitions("-Wall")
# PROGRAMS:
2017-12-01 16:03:19 +01:00
add_executable(breakhack
2017-11-30 21:00:47 +01:00
src/main
src/texture
src/screenresolution
src/sprite
src/util
src/player
2017-12-01 16:03:19 +01:00
src/map
2017-12-02 23:32:40 +01:00
src/map_lua
2017-12-01 16:03:19 +01:00
src/camera
2017-12-05 08:30:08 +01:00
src/timer
src/roommatrix
src/position
2017-11-30 21:00:47 +01:00
)
2017-12-01 16:03:19 +01:00
target_link_libraries(breakhack
2017-11-30 21:00:47 +01:00
linkedlist
2017-12-05 12:40:37 +01:00
${LUA_LIBRARIES}
2017-11-30 21:00:47 +01:00
-lSDL2
-lSDL2_image
-lSDL2_mixer
-lSDL2_ttf
-lX11
)
# TESTS:
enable_testing()
add_executable(test_util test/check_util src/util)
2017-12-05 13:40:52 +01:00
target_compile_options(test_util PRIVATE -pthread)
2017-11-30 21:00:47 +01:00
target_link_libraries(test_util -lcheck)
add_test(test_util test_util)