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
|
|
|
|
2021-03-15 17:28:26 -05:00
|
|
|
## Find Bullet
|
|
|
|
find_package(Bullet REQUIRED)
|
|
|
|
|
2021-03-15 17:28:32 -05:00
|
|
|
## 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-02 15:03:55 -06:00
|
|
|
|
2021-03-16 13:33:49 -05:00
|
|
|
add_library(couchlib_luascripting STATIC)
|
|
|
|
|
2021-03-02 15:03:55 -06:00
|
|
|
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})
|
|
|
|
|
2021-03-15 17:28:26 -05:00
|
|
|
target_include_directories(couchlib
|
|
|
|
PUBLIC
|
|
|
|
${BULLET_INCLUDE_DIRS})
|
|
|
|
|
2021-03-15 17:28:32 -05:00
|
|
|
target_include_directories(couchlib
|
|
|
|
PUBLIC
|
|
|
|
${ASSIMP_INCLUDE_DIR})
|
|
|
|
|
2021-03-02 15:03:55 -06:00
|
|
|
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)
|
2021-03-02 15:03:55 -06:00
|
|
|
target_link_libraries(couchlib_luascripting ${LUA_LIBRARIES})
|
2021-01-27 16:05:46 -06:00
|
|
|
endif ()
|
2021-03-15 17:28:26 -05:00
|
|
|
target_link_libraries(couchlib ${BULLET_LIBRARIES})
|
2021-03-15 17:28:32 -05:00
|
|
|
target_link_libraries(couchlib ${ASSIMP_LIBRARY})
|
2021-01-26 16:42:28 -06:00
|
|
|
|
|
|
|
## Add documentation
|
2021-04-05 13:50:50 -05:00
|
|
|
option(BUILD_DOCUMENTATION "Build the Doxygen documentation" OFF)
|
|
|
|
if(BUILD_DOCUMENTATION)
|
2021-04-07 17:22:39 -05:00
|
|
|
find_package(Doxygen
|
2021-04-05 13:50:50 -05:00
|
|
|
OPTIONAL_COMPONENTS dot mscgen dia)
|
|
|
|
doxygen_add_docs(couchdocs
|
|
|
|
.
|
|
|
|
mainpage.dox)
|
|
|
|
endif()
|