CMake: Add install rule
Install libGL and its headers to the sysroot directory when "make install" is executed. Signed-off-by: Paul Cercueil <paul@crapouillou.net>
This commit is contained in:
parent
6ea25ff3c7
commit
134b58f8db
@ -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)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user