summaryrefslogtreecommitdiff
path: root/libs/raylib/cmake/InstallConfigurations.cmake
diff options
context:
space:
mode:
authorThomas <mail.thomasclement@gmail.com>2021-08-15 10:03:09 +0200
committerThomas <mail.thomasclement@gmail.com>2021-08-15 10:03:09 +0200
commit3a1d97f556bc4c5384799ac121640984b590c05c (patch)
tree20aeab4c18d76c344e2ce1f16913b39c447659b1 /libs/raylib/cmake/InstallConfigurations.cmake
parenteebaddf29efad9bc7b82d8745d839931f08ef887 (diff)
downloadgamejam-slgj-2024-3a1d97f556bc4c5384799ac121640984b590c05c.tar.gz
gamejam-slgj-2024-3a1d97f556bc4c5384799ac121640984b590c05c.tar.bz2
gamejam-slgj-2024-3a1d97f556bc4c5384799ac121640984b590c05c.zip
Updated to raylib 3.7
Diffstat (limited to 'libs/raylib/cmake/InstallConfigurations.cmake')
-rw-r--r--libs/raylib/cmake/InstallConfigurations.cmake29
1 files changed, 29 insertions, 0 deletions
diff --git a/libs/raylib/cmake/InstallConfigurations.cmake b/libs/raylib/cmake/InstallConfigurations.cmake
new file mode 100644
index 0000000..6a89ad5
--- /dev/null
+++ b/libs/raylib/cmake/InstallConfigurations.cmake
@@ -0,0 +1,29 @@
+install(
+ TARGETS raylib EXPORT raylib-targets
+ ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}"
+ RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}"
+ PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
+)
+
+# PKG_CONFIG_LIBS_PRIVATE is used in raylib.pc.in
+if (NOT BUILD_SHARED_LIBS)
+ include(LibraryPathToLinkerFlags)
+ library_path_to_linker_flags(__PKG_CONFIG_LIBS_PRIVATE "${LIBS_PRIVATE}")
+ set(PKG_CONFIG_LIBS_PRIVATE ${__PKG_CONFIG_LIBS_PRIVATE} ${GLFW_PKG_LIBS})
+ string(REPLACE ";" " " PKG_CONFIG_LIBS_PRIVATE "${PKG_CONFIG_LIBS_PRIVATE}")
+elseif (BUILD_SHARED_LIBS)
+ set(PKG_CONFIG_LIBS_EXTRA "")
+endif ()
+
+join_paths(libdir_for_pc_file "\${exec_prefix}" "${CMAKE_INSTALL_LIBDIR}")
+join_paths(includedir_for_pc_file "\${prefix}" "${CMAKE_INSTALL_INCLUDEDIR}")
+configure_file(../raylib.pc.in raylib.pc @ONLY)
+configure_file(../cmake/raylib-config-version.cmake raylib-config-version.cmake @ONLY)
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/raylib.pc DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
+install(FILES ${CMAKE_CURRENT_BINARY_DIR}/raylib-config-version.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/raylib")
+install(FILES ${PROJECT_SOURCE_DIR}/../cmake/raylib-config.cmake DESTINATION "${CMAKE_INSTALL_LIBDIR}/cmake/raylib")
+
+# populates raylib_{FOUND, INCLUDE_DIRS, LIBRARIES, LDFLAGS, DEFINITIONS}
+include(PopulateConfigVariablesLocally)
+populate_config_variables_locally(raylib)