diff --git a/CMakeLists.txt b/CMakeLists.txt index a0e3bfc..f96a737 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -61,6 +61,7 @@ set_target_properties(GL PROPERTIES COMPILE_DEFINITIONS -DBACKEND_${BACKEND_UPPER} C_STANDARD 99 INTERPROCEDURAL_OPTIMIZATION ${FLTO_SUPPORTED} + PUBLIC_HEADER "include/GL/gl.h;include/GL/glext.h;include/GL/glu.h;include/GL/glkos.h" ) target_include_directories(GL PUBLIC ${CMAKE_SOURCE_DIR}/include) @@ -100,6 +101,14 @@ else() ) endif() +include(GNUInstallDirs) + +install(TARGETS GL + ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR} + LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR} + PUBLIC_HEADER DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/GL +) + function(gen_sample sample) add_executable(${sample} ${ARGN}) target_link_libraries(${sample} PRIVATE m GL)