diff --git a/ports/glm/CMakeLists.txt b/ports/glm/CMakeLists.txt deleted file mode 100644 index e323256fb8..0000000000 --- a/ports/glm/CMakeLists.txt +++ /dev/null @@ -1,23 +0,0 @@ -cmake_minimum_required(VERSION 3.12 FATAL_ERROR) - -project(glm LANGUAGES CXX) - -include(GNUInstallDirs) - -add_library(glm INTERFACE) -target_include_directories(glm INTERFACE $) - -install(TARGETS glm EXPORT glm) - -install( - EXPORT glm - FILE glm-config.cmake - DESTINATION "${CMAKE_INSTALL_DATAROOTDIR}/glm" - NAMESPACE glm:: -) - -install( - DIRECTORY "${CMAKE_SOURCE_DIR}/glm" - DESTINATION "${CMAKE_INSTALL_INCLUDEDIR}" - PATTERN "CMakeLists.txt" EXCLUDE -) diff --git a/ports/glm/portfile.cmake b/ports/glm/portfile.cmake index 133c81ec6e..b77262c482 100644 --- a/ports/glm/portfile.cmake +++ b/ports/glm/portfile.cmake @@ -1,23 +1,26 @@ +vcpkg_check_linkage(ONLY_STATIC_LIBRARY) + vcpkg_from_github( OUT_SOURCE_PATH SOURCE_PATH REPO g-truc/glm - REF bf71a834948186f4097caa076cd2663c69a10e1e #v0.9.9.8 - SHA512 226266c02af616a96fb19ee32cf3f98347daa43a4fde5d618d36b38709dce1280de126c542524d40725ecf70359edcc5b60660554c65ce246514501fb4c9c87c + REF "${VERSION}" + SHA512 62e22002a6369a54e1f0ee2885a65f2780af7d2a446573e5387b81518f5dc7e8076053837cb99ae850a0166ce8b0f077bed009e8986d9884d01c456ce467553f HEAD_REF master ) -set(VCPKG_BUILD_TYPE release) # header-only port - -file(COPY "${CMAKE_CURRENT_LIST_DIR}/CMakeLists.txt" DESTINATION "${SOURCE_PATH}") - vcpkg_cmake_configure( SOURCE_PATH "${SOURCE_PATH}" + OPTIONS + -DGLM_ENABLE_CXX_17=ON + -DGLM_BUILD_LIBRARY=ON + -DGLM_BUILD_TESTS=OFF + -DGLM_BUILD_INSTALL=ON ) vcpkg_cmake_install() vcpkg_cmake_config_fixup() -file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/lib") +file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include") -# Put the license file where vcpkg expects it -file(INSTALL "${SOURCE_PATH}/copying.txt" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright) +vcpkg_install_copyright(FILE_LIST "${SOURCE_PATH}/copying.txt") +file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}") diff --git a/ports/glm/usage b/ports/glm/usage new file mode 100644 index 0000000000..0f63af2a73 --- /dev/null +++ b/ports/glm/usage @@ -0,0 +1,8 @@ +The package glm provides CMake targets: + + find_package(glm CONFIG REQUIRED) + target_link_libraries(main PRIVATE glm::glm) + + # Or use the header-only version + find_package(glm CONFIG REQUIRED) + target_link_libraries(main PRIVATE glm::glm-header-only) diff --git a/ports/glm/vcpkg.json b/ports/glm/vcpkg.json index a81138c051..dba6e76624 100644 --- a/ports/glm/vcpkg.json +++ b/ports/glm/vcpkg.json @@ -1,7 +1,6 @@ { "name": "glm", - "version": "0.9.9.8", - "port-version": 2, + "version": "1.0.0", "description": "OpenGL Mathematics (GLM)", "homepage": "https://glm.g-truc.net", "license": "MIT", diff --git a/versions/baseline.json b/versions/baseline.json index f86a84c648..1969ec5b8c 100644 --- a/versions/baseline.json +++ b/versions/baseline.json @@ -3029,8 +3029,8 @@ "port-version": 1 }, "glm": { - "baseline": "0.9.9.8", - "port-version": 2 + "baseline": "1.0.0", + "port-version": 0 }, "globjects": { "baseline": "1.1.0", diff --git a/versions/g-/glm.json b/versions/g-/glm.json index 5f8b7654fc..b6fcf3d522 100644 --- a/versions/g-/glm.json +++ b/versions/g-/glm.json @@ -1,5 +1,10 @@ { "versions": [ + { + "git-tree": "ed558e712eafccb124025c665c39f21998c71438", + "version": "1.0.0", + "port-version": 0 + }, { "git-tree": "6687c48e237aab1c30cf4c589d08f698f73cf178", "version-date": "2023-06-08",