dungeon/CMakeLists.txt

36 lines
861 B
CMake
Raw Normal View History

2017-09-17 13:43:13 +02:00
cmake_minimum_required(VERSION 2.8.9)
set(CMAKE_DISABLE_SOURCE_CHANGES ON)
set(CMAKE_DISABLE_IN_SOURCE_BUILD ON)
2017-09-17 20:07:38 +02:00
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
2017-09-17 13:43:13 +02:00
2017-09-17 20:07:38 +02:00
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -static-libgcc -static-libstdc++")
2017-09-17 13:43:13 +02:00
if(MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Za")
endif(MSVC)
2017-09-17 20:07:38 +02:00
project(dungeon)
2017-09-17 13:43:13 +02:00
2017-09-17 20:07:38 +02:00
find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
find_package(Lua REQUIRED)
2017-09-17 13:43:13 +02:00
find_package(SDL2 REQUIRED)
include_directories(
${OPENGL_INCLUDE_DIR}
${SDL2_INCLUDE_DIR}
${GLEW_INCLUDE_DIRS}
${LUA_INCLUDE_DIR}
"libs/glm"
"libs/kaguya-1.3.2/include"
)
link_libraries(
${OPENGL_LIBRARIES}
${SDL2_LIBRARY}
${GLEW_LIBRARIES}
${LUA_LIBRARIES}
)
2017-09-17 13:43:13 +02:00
file(GLOB SOURCES "src/*.cpp" "src/*.c" "src/*.h")
2017-09-17 13:43:13 +02:00
add_executable(dungeon ${SOURCES})