mirror of
https://github.com/raysan5/raylib.git
synced 2025-12-06 06:13:10 +00:00
* Improve cmake config file generation
This allows for finding raylib on a non-standard location (eg, not in /usr/lib{,64})
* Only have glfw as private if using internal glfw and not static
24 lines
566 B
CMake
24 lines
566 B
CMake
include(CMakePackageConfigHelpers)
|
|
include(GNUInstallDirs)
|
|
|
|
# Setup install of exported targets
|
|
install(EXPORT raylib-targets
|
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/raylib
|
|
)
|
|
|
|
# Macro to write config
|
|
write_basic_package_version_file(
|
|
"${CMAKE_CURRENT_BINARY_DIR}/raylib-config-version.cmake"
|
|
VERSION ${raylib_VERSION}
|
|
COMPATIBILITY SameMajorVersion
|
|
)
|
|
|
|
# Setup install of version config
|
|
install(
|
|
FILES
|
|
"../cmake/raylib-config.cmake"
|
|
"${CMAKE_CURRENT_BINARY_DIR}/raylib-config-version.cmake"
|
|
DESTINATION
|
|
${CMAKE_INSTALL_LIBDIR}/cmake/raylib
|
|
)
|