52 lines
1.0 KiB
CMake

find_package(glfw3 REQUIRED)
find_package(OpenGL REQUIRED)
find_package(PkgConfig REQUIRED)
pkg_check_modules(IMGUI REQUIRED imgui)
add_library(DeerithClient)
file(GLOB_RECURSE deerith_SOURCES
CONFIGURE_DEPENDS
${CMAKE_CURRENT_SOURCE_DIR}/src/*.cpp
)
target_sources(DeerithClient
PRIVATE
${deerith_SOURCES}
)
target_include_directories(DeerithClient
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/include
${IMGUI_INCLUDE_DIRS}
)
target_include_directories(DeerithClient
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/src
)
target_link_libraries(DeerithClient
PUBLIC
DeerithCore
OpenGL::GL
glfw
${IMGUI_LIBRARIES}
)
add_custom_target(DeerithClientShaders ALL
COMMAND ${CMAKE_COMMAND} -E copy_directory
${CMAKE_CURRENT_SOURCE_DIR}/shaders
${CMAKE_CURRENT_BINARY_DIR}/shaders
)
target_compile_definitions(DeerithClient
PUBLIC
DEERITH_CLIENT
)
add_dependencies(DeerithClient DeerithClientShaders)