cmake_minimum_required(VERSION 3.20) project(LibOVR) message(STATUS "Building LibOVR for ${CMAKE_BUILD_TYPE} configuration") include_directories(LibOVR/Include LibOVR/Src) file(GLOB HEADER_FILES LibOVR/Include/*.h) file(GLOB EXTRA_HEADER_FILES LibOVR/Include/Extras/*.h) file(GLOB_RECURSE SOURCE_FILES LibOVR/Shim/*.c LibOVR/Shim/*.cpp) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -DOVR_BUILD_DEBUG") add_library(LibOVR STATIC ${SOURCE_FILES} ${HEADER_FILES} ${EXTRA_HEADER_FILES}) set_target_properties(LibOVR PROPERTIES DEBUG_POSTFIX "d") install(TARGETS LibOVR DESTINATION Lib) install(FILES ${HEADER_FILES} DESTINATION Include) install(FILES ${EXTRA_HEADER_FILES} DESTINATION Include/Extras)