couch/CMakeLists.txt

37 lines
934 B
CMake
Raw Normal View History

2021-01-14 14:36:37 -06:00
cmake_minimum_required(VERSION 3.13)
project(Couch)
2021-02-05 11:22:37 -06:00
set(CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake/modules" ${CMAKE_MODULE_PATH})
2021-01-14 14:36:37 -06:00
2021-01-27 16:05:46 -06:00
option(LUA_ENABLED "Lua scripting support" ON)
if (LUA_ENABLED)
add_compile_definitions(LUA_SCRIPTING)
endif ()
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)
target_link_libraries(couch couchlib_luascripting)
2021-01-20 20:49:12 -06:00
2021-01-26 16:42:28 -06:00
add_subdirectory(scripting)
2021-01-27 16:05:46 -06:00
if (LUA_ENABLED)
target_link_libraries(couch couchlua)
endif()
2021-01-14 14:36:37 -06:00
add_subdirectory(thirdparty)
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/")
if(WIN32)
target_link_libraries(couch glfw3dll)
target_link_libraries(couch ssp)
set(CMAKE_EXE_LINKER_FLAGS "-static-libgcc -static-libstdc++")
endif(WIN32)
2021-01-20 17:37:56 -06:00
2021-01-27 16:05:46 -06:00
install(TARGETS couch couchlib)
if (LUA_ENABLED)
install(TARGETS couch couchlua)
endif ()