couch/core/CMakeLists.txt

105 lines
1.9 KiB
CMake
Raw Permalink Normal View History

2021-01-26 16:42:28 -06:00
project(Couch)
## Find OPENGL packages
find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
2021-04-05 14:33:26 -05:00
find_package(glfw3 REQUIRED)
2021-01-26 16:42:28 -06:00
## Find Bullet
find_package(Bullet REQUIRED)
## Find AssImp
find_package(ASSIMP REQUIRED)
2021-03-16 13:33:49 -05:00
add_library(couchlib STATIC)
2021-01-26 16:42:28 -06:00
target_sources(couchlib PUBLIC
Camera.h
Camera.cpp
CollisionShape.h
CollisionShape.cpp
constants.h
2021-03-09 16:40:21 -06:00
Framebuffer.h
Framebuffer.cpp
2021-01-26 16:42:28 -06:00
Index.h
Index.cpp
Input.h
Input.cpp
Light.h
Light.cpp
Material.h
Material.cpp
Mesh.h
Mesh.cpp
Node.h
Node.cpp
Rigidbody.h
Rigidbody.cpp
Screen.h
Screen.cpp
Skybox.h
Skybox.cpp
Spatial.h
Spatial.cpp
Transform.h
Transform.cpp
types.h
types.cpp
Util.h
Util.cpp
Vertex.h
Vertex.cpp
2021-03-08 13:50:50 -06:00
Window.h
Window.cpp
2021-01-26 16:42:28 -06:00
World.h
World.cpp
Scripting/ScriptingLanguage.h
Scripting/ScriptingLanguage.cpp
Shaders/FlatShader.h
Shaders/FlatShader.cpp
Shaders/ScreenShader.h
Shaders/ScreenShader.cpp
Shaders/Shader.h
Shaders/Shader.cpp
Shaders/SkyboxShader.h
Shaders/SkyboxShader.cpp)
2021-03-16 13:33:49 -05:00
add_library(couchlib_luascripting STATIC)
target_sources(couchlib_luascripting PUBLIC
Scripting/Lua.h
Scripting/Lua.cpp)
target_link_libraries(couchlib_luascripting couchlua)
2021-01-26 16:42:28 -06:00
target_include_directories(couchlib
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR})
target_include_directories(couchlib
PUBLIC
${BULLET_INCLUDE_DIRS})
target_include_directories(couchlib
PUBLIC
${ASSIMP_INCLUDE_DIR})
target_link_libraries(couchlib glfw)
2021-01-26 16:42:28 -06:00
target_link_libraries(couchlib OpenGL::GL)
target_link_libraries(couchlib GLEW::GLEW)
2021-01-27 16:05:46 -06:00
if (LUA_ENABLED)
target_link_libraries(couchlib_luascripting ${LUA_LIBRARIES})
2021-01-27 16:05:46 -06:00
endif ()
target_link_libraries(couchlib ${BULLET_LIBRARIES})
target_link_libraries(couchlib ${ASSIMP_LIBRARY})
2021-01-26 16:42:28 -06:00
## Add documentation
option(BUILD_DOCUMENTATION "Build the Doxygen documentation" OFF)
if(BUILD_DOCUMENTATION)
find_package(Doxygen
OPTIONAL_COMPONENTS dot mscgen dia)
doxygen_add_docs(couchdocs
.
mainpage.dox)
endif()