couch/core/CMakeLists.txt

106 lines
1.9 KiB
CMake
Raw Normal View History

2021-01-26 16:42:28 -06:00
project(Couch)
## Find OPENGL packages
find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
find_package(glfw3 3.3 REQUIRED)
## Find Bullet
find_package(Bullet REQUIRED)
2021-02-05 11:22:37 -06:00
## Find AssImp
find_package(ASSIMP REQUIRED)
2021-01-27 16:05:46 -06:00
if (LUA_ENABLED)
2021-01-26 16:42:28 -06:00
## Find Lua
find_package(Lua REQUIRED)
2021-01-27 16:05:46 -06:00
endif ()
2021-01-26 16:42:28 -06:00
add_library(couchlib SHARED)
target_sources(couchlib PUBLIC
Camera.h
Camera.cpp
CollisionShape.h
CollisionShape.cpp
constants.h
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
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)
if (WIN32)
add_library(couchlib_luascripting STATIC)
else ()
add_library(couchlib_luascripting SHARED)
endif ()
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})
2021-02-05 11:22:37 -06:00
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 ()
2021-01-26 16:42:28 -06:00
target_link_libraries(couchlib ${BULLET_LIBRARIES})
2021-02-05 11:22:37 -06:00
target_link_libraries(couchlib ${ASSIMP_LIBRARY})
2021-01-26 16:42:28 -06:00
## Add documentation
find_package(Doxygen REQUIRED
OPTIONAL_COMPONENTS dot mscgen dia)
2021-01-26 16:51:27 -06:00
doxygen_add_docs(couchdocs
2021-01-26 22:04:57 -06:00
.
mainpage.dox)