summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorhristo <[email protected]>2020-12-16 20:11:21 +0200
committerGitHub <[email protected]>2020-12-16 19:11:21 +0100
commit0987507ef581a423aa304ed0d816cddbb7795fcd (patch)
tree6ac76e2365458c75a353cdb494208deeee92e995
parentef0dcaabf934dcdb418df66069a5c0de379ac6f8 (diff)
downloadraylib-0987507ef581a423aa304ed0d816cddbb7795fcd.tar.gz
raylib-0987507ef581a423aa304ed0d816cddbb7795fcd.zip
Add headers to install cmake (#1462)
* Changed extension for web from .bc to .a I did this to support vcpkg expectation. When using the library from vcpkg for web you would install it using vcpkg install raylib:wasm32-emscripten but also vcpkg expects the output lib to be with .a extension instead of .bc Doesn't make a difference for standalone builds or when raylib is used as a subdirectory dependency. * Added headers to install targets to fix vcpkg usage Currently vcpkg works by installing the cmake target into its packages directory. The problem is that install only copies the public header at this point so we need to add the others to the install targets.
-rw-r--r--src/CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 6aa11753..577db634 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -207,7 +207,7 @@ if(STATIC)
ARCHIVE DESTINATION "${CMAKE_INSTALL_LIBDIR}"
PUBLIC_HEADER DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}"
)
-set_target_properties(raylib_static PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}")
+ set_target_properties(raylib_static PROPERTIES INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_BINARY_DIR}")
add_test("pkg-config--static" ${PROJECT_SOURCE_DIR}/../cmake/test-pkgconfig.sh --static)
endif(STATIC)
@@ -292,6 +292,13 @@ file(COPY "physac.h" DESTINATION ".")
file(COPY "raymath.h" DESTINATION ".")
file(COPY "raudio.h" DESTINATION ".")
+# Also install them
+install(FILES "raylib.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+install(FILES "rlgl.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+install(FILES "physac.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+install(FILES "raymath.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+install(FILES "raudio.h" DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}")
+
# Print the flags for the user
if (DEFINED CMAKE_BUILD_TYPE)
message(STATUS "Generated build type: ${CMAKE_BUILD_TYPE}")