Improved CMake
This commit is contained in:
16
src/CMakeLists.txt
Normal file
16
src/CMakeLists.txt
Normal file
@@ -0,0 +1,16 @@
|
||||
|
||||
find_package(OpenGL REQUIRED)
|
||||
find_package(OpenHMD REQUIRED)
|
||||
|
||||
add_library(lvrc ../include/lvrc.h lvrc.c lvrc_internal.h instance.c instance.h swapChain.c swapChain.h frame.c frame.h)
|
||||
|
||||
target_link_libraries(lvrc PUBLIC openhmd ${OPENGL_LIBRARIES} EGL)
|
||||
target_link_libraries(lvrc PUBLIC "drm" "gbm")
|
||||
target_include_directories(lvrc PRIVATE "/usr/include/drm/")
|
||||
target_include_directories(lvrc PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/../include")
|
||||
|
||||
if (ENABLE_XCB)
|
||||
target_link_libraries(lvrc PUBLIC "xcb" "xcb-randr")
|
||||
target_compile_definitions(lvrc PRIVATE ENABLE_XCB=1)
|
||||
endif(ENABLE_XCB)
|
||||
|
||||
Reference in New Issue
Block a user