cmake_minimum_required(VERSION 3.1) project (lagui) if (POLICY CMP0072) set(OpenGL_GL_PREFERENCE GLVND) endif() find_package(OpenGL REQUIRED) find_package(X11 REQUIRED) find_package(Freetype REQUIRED) find_package(GLEW REQUIRED) file(GLOB_RECURSE SOURCE_FILES ./**.c ./**.cpp) # Add header files file(GLOB_RECURSE HEADER_FILES ./**.h ./**.hpp) add_definitions(-w) include_directories( ${CMAKE_SOURCE_DIR} ${X11_INCLUDE_DIR} ${GLEW_INCLUDE_PATH} ${GLM_INCLUDE_PATH} ${FREETYPE_INCLUDE_DIRS} ${ODE_INCLUDE_DIRS} lagui ) add_library(lagui ${HEADER_FILES} ${SOURCE_FILES}) install(FILES ${HEADER_FILES} DESTINATION include/lagui) install(TARGETS lagui EXPORT lagui-targets DESTINATION lib/lagui) install(EXPORT lagui-targets DESTINATION lib/lagui) install(FILES lagui-config.cmake DESTINATION lib/lagui)