aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVitalii Koshura <lestat.de.lionkur@gmail.com>2020-05-16 01:35:33 +0200
committerGitHub <noreply@github.com>2020-05-15 16:35:33 -0700
commit21848ba4de6735c535e9fb95f35a725f1da326dc (patch)
treea5af075fe9a57157bb352f512359651048de502d
parent52ced296bd30417a8fd548a0258c9d97b6c77260 (diff)
downloadvcpkg-21848ba4de6735c535e9fb95f35a725f1da326dc.tar.gz
vcpkg-21848ba4de6735c535e9fb95f35a725f1da326dc.zip
[OpenGL] Fix lib files copy when VCPKG_BUILD_TYPE is set (#11294)
* [OpenGL] Fix lib files copy when VCPKG_BUILD_TYPE is set Signed-off-by: Vitalii Koshura <lestat.de.lionkur@gmail.com> * Change from release -> "release" in CMake if Co-authored-by: nicole mazzuca <mazzucan@outlook.com>
-rw-r--r--ports/opengl/CONTROL2
-rw-r--r--ports/opengl/portfile.cmake24
2 files changed, 19 insertions, 7 deletions
diff --git a/ports/opengl/CONTROL b/ports/opengl/CONTROL
index 365b908cf..d8408e722 100644
--- a/ports/opengl/CONTROL
+++ b/ports/opengl/CONTROL
@@ -1,3 +1,3 @@
Source: opengl
-Version: 0.0-5
+Version: 0.0-6
Description: Open Graphics Library (OpenGL)[3][4][5] is a cross-language, cross-platform application programming interface (API) for rendering 2D and 3D vector graphics.
diff --git a/ports/opengl/portfile.cmake b/ports/opengl/portfile.cmake
index 80df4ae74..63b4c0ffa 100644
--- a/ports/opengl/portfile.cmake
+++ b/ports/opengl/portfile.cmake
@@ -26,20 +26,32 @@ if(NOT VCPKG_CMAKE_SYSTEM_NAME OR VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore
file(MAKE_DIRECTORY
${CURRENT_PACKAGES_DIR}/include/gl
- ${CURRENT_PACKAGES_DIR}/lib
- ${CURRENT_PACKAGES_DIR}/debug/lib
${CURRENT_PACKAGES_DIR}/share/opengl
)
+ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
+ file(MAKE_DIRECTORY
+ ${CURRENT_PACKAGES_DIR}/lib
+ )
+ endif()
+ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
+ file(MAKE_DIRECTORY
+ ${CURRENT_PACKAGES_DIR}/debug/lib
+ )
+ endif()
file(COPY
"${HEADERSPATH}\\gl\\GL.h"
"${HEADERSPATH}\\gl\\GLU.h"
DESTINATION ${CURRENT_PACKAGES_DIR}/include/gl
)
- file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
- file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
- file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
- file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "release")
+ file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+ file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/lib)
+ endif()
+ if (NOT VCPKG_BUILD_TYPE OR VCPKG_BUILD_TYPE STREQUAL "debug")
+ file(COPY ${LIBGLFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+ file(COPY ${LIBGLUFILEPATH} DESTINATION ${CURRENT_PACKAGES_DIR}/debug/lib)
+ endif()
if (WINDOWS_SDK MATCHES "10.")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/opengl/copyright "See https://developer.microsoft.com/windows/downloads/windows-10-sdk for the Windows 10 SDK license")