2021-01-14 14:36:37 -06:00
|
|
|
cmake_minimum_required(VERSION 3.13)
|
|
|
|
project(Couch)
|
|
|
|
set(CMAKE_MODULE_PATH, ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR/cmake.})
|
|
|
|
|
|
|
|
add_compile_definitions(LUA_SCRIPTING)
|
2021-01-26 16:42:28 -06:00
|
|
|
add_executable(couch core/couch.cpp)
|
2021-01-14 14:36:37 -06:00
|
|
|
|
2021-01-26 16:42:28 -06:00
|
|
|
add_subdirectory(core)
|
|
|
|
target_link_libraries(couch couchlib)
|
2021-01-20 20:49:12 -06:00
|
|
|
|
2021-01-26 16:42:28 -06:00
|
|
|
add_subdirectory(scripting)
|
2021-01-14 14:36:37 -06:00
|
|
|
target_link_libraries(couch couchlua)
|
|
|
|
|
2021-01-17 14:36:38 -06:00
|
|
|
add_subdirectory(thirdparty)
|
|
|
|
|
2021-01-17 18:03:09 -06:00
|
|
|
add_subdirectory(shaders)
|
2021-01-26 16:42:28 -06:00
|
|
|
add_dependencies(couchlib shader_headers)
|
|
|
|
target_include_directories(couchlib
|
2021-01-18 18:25:47 -06:00
|
|
|
PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/shaders/")
|
2021-01-17 18:03:09 -06:00
|
|
|
|
2021-01-15 14:20:25 -06:00
|
|
|
if(WIN32)
|
|
|
|
target_link_libraries(couch glfw3dll)
|
2021-01-17 14:36:38 -06:00
|
|
|
target_link_libraries(couch ssp)
|
2021-01-15 14:20:25 -06:00
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
|
|
|
|
endif(WIN32)
|
2021-01-20 17:37:56 -06:00
|
|
|
|
2021-01-26 16:42:28 -06:00
|
|
|
install(TARGETS couch couchlib couchlua)
|