diff options
| author | Alexander Karatarakis <alex@karatarakis.com> | 2016-11-14 12:52:38 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-11-14 12:52:38 -0800 |
| commit | 70c4cbce771de2930f5be53f57db74b6f5b5eb65 (patch) | |
| tree | ed6d5a16bad62d92973ad376948f264eda2c8b3a | |
| parent | 54abb9f5193e15e932a1b24a5b8dadd46f482426 (diff) | |
| parent | abe8d017dfb40c97451e493aa569c8178b8f10e2 (diff) | |
| download | vcpkg-70c4cbce771de2930f5be53f57db74b6f5b5eb65.tar.gz vcpkg-70c4cbce771de2930f5be53f57db74b6f5b5eb65.zip | |
Merge pull request #284 from drdanz/glfw3_fix_cmake_config
[glfw3] Fix paths in cmake config files
| -rw-r--r-- | ports/glfw3/portfile.cmake | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/ports/glfw3/portfile.cmake b/ports/glfw3/portfile.cmake index 3f834f9b6..8ec382fda 100644 --- a/ports/glfw3/portfile.cmake +++ b/ports/glfw3/portfile.cmake @@ -34,7 +34,13 @@ vcpkg_install_cmake() file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/share) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/cmake/glfw3 ${CURRENT_PACKAGES_DIR}/share/glfw3) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake) -file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/glfw3/glfw3Targets-debug.cmake ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets-debug.cmake) +file(READ ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets.cmake _contents) +string(REPLACE "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\n\n" "\n" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets.cmake ${_contents}) + +file(READ ${CURRENT_PACKAGES_DIR}/debug/lib/cmake/glfw3/glfw3Targets-debug.cmake _contents) +string(REPLACE "\${_IMPORT_PREFIX}" "\${_IMPORT_PREFIX}/debug" _contents "${_contents}") +file(WRITE ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets-debug.cmake "${_contents}") file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/lib/cmake) file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include) @@ -43,6 +49,13 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/bin ${CURRENT_PACKAGES_DIR}/debug/bin) file(RENAME ${CURRENT_PACKAGES_DIR}/lib/glfw3.dll ${CURRENT_PACKAGES_DIR}/bin/glfw3.dll) file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/glfw3.dll ${CURRENT_PACKAGES_DIR}/debug/bin/glfw3.dll) + foreach(_conf release + debug) + file(READ ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets-${_conf}.cmake _contents) + string(REPLACE "lib/glfw3.dll" "bin/glfw3.dll" _contents "${_contents}") + file(WRITE ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets-${_conf}.cmake "${_contents}") + endforeach() + endif() file(COPY ${SOURCE_PATH}/COPYING.txt DESTINATION ${CURRENT_PACKAGES_DIR}/share/glfw3) |
