Skip to content

Commit

Permalink
Fix glfw3:x64-linux producing incorrect target (#3803)
Browse files Browse the repository at this point in the history
* Fix glfw3 creating incorrect target

glfw3Target.cmake uses a semicolon seperated list which needs to be
escaped with quotes on write

* Fix semicolon stripping

* Fix typo

* [dlib][glfw3][libodb][signalrclient] Bump versions
  • Loading branch information
Qi-rui Chen authored and ras0219-msft committed Jul 3, 2018
1 parent fae4bd4 commit 98e8c22
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 15 deletions.
2 changes: 1 addition & 1 deletion ports/dlib/CONTROL
@@ -1,5 +1,5 @@
Source: dlib
Version: 19.13
Version: 19.13-1
Build-Depends: libjpeg-turbo, libpng, sqlite3, fftw3, openblas, clapack
Description: Modern C++ toolkit containing machine learning algorithms and tools for creating complex software in C++

Expand Down
2 changes: 1 addition & 1 deletion ports/dlib/portfile.cmake
Expand Up @@ -69,7 +69,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/include/dlib/external/libpng/arm)
file(READ ${CURRENT_PACKAGES_DIR}/include/dlib/config.h _contents)
string(REPLACE "/* #undef ENABLE_ASSERTS */" "#if defined(_DEBUG)\n#define ENABLE_ASSERTS\n#endif" _contents ${_contents})
string(REPLACE "#define DLIB_DISABLE_ASSERTS" "#if !defined(_DEBUG)\n#define DLIB_DISABLE_ASSERTS\n#endif" _contents ${_contents})
file(WRITE ${CURRENT_PACKAGES_DIR}/include/dlib/config.h ${_contents})
file(WRITE ${CURRENT_PACKAGES_DIR}/include/dlib/config.h "${_contents}")

file(READ ${CURRENT_PACKAGES_DIR}/share/dlib/dlib.cmake _contents)
string(REPLACE
Expand Down
2 changes: 1 addition & 1 deletion ports/glfw3/CONTROL
@@ -1,3 +1,3 @@
Source: glfw3
Version: 3.2.1-2
Version: 3.2.1-3
Description: GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and Vulkan application development. It provides a simple, platform-independent API for creating windows, contexts and surfaces, reading input, handling events, etc.
4 changes: 2 additions & 2 deletions ports/glfw3/portfile.cmake
Expand Up @@ -16,7 +16,7 @@ if(NOT EXISTS ${SOURCE_PATH}/patch-config.stamp)
#string(REPLACE "@PACKAGE_CMAKE_INSTALL_PREFIX@" "@PACKAGE_CMAKE_INSTALL_PREFIX@/../.."
# CONFIG ${CONFIG}
#)
file(WRITE ${SOURCE_PATH}/src/glfw3Config.cmake.in ${CONFIG})
file(WRITE ${SOURCE_PATH}/src/glfw3Config.cmake.in "${CONFIG}")
file(APPEND ${SOURCE_PATH}/src/glfw3Config.cmake.in "set(GLFW3_LIBRARIES \${GLFW3_LIBRARY})\n")
file(WRITE ${SOURCE_PATH}/patch-config.stamp)
endif()
Expand All @@ -43,7 +43,7 @@ file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/lib/cmake)
file(READ ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets.cmake _contents)
set(pattern "get_filename_component(_IMPORT_PREFIX \"\${_IMPORT_PREFIX}\" PATH)\n")
string(REPLACE "${pattern}${pattern}${pattern}" "${pattern}${pattern}" _contents "${_contents}")
file(WRITE ${CURRENT_PACKAGES_DIR}/share/glfw3/glfw3Targets.cmake ${_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}")
Expand Down
2 changes: 1 addition & 1 deletion ports/libodb/CONTROL
@@ -1,3 +1,3 @@
Source: libodb
Version: 2.4.0-2
Version: 2.4.0-3
Description: ODB library, base runtime for the ODB ORM solution
2 changes: 1 addition & 1 deletion ports/libodb/portfile.cmake
Expand Up @@ -43,6 +43,6 @@ if(VCPKG_LIBRARY_LINKAGE STREQUAL static)
else()
string(REPLACE "#ifdef LIBODB_STATIC_LIB" "#if 0" LIBODB_HEADER ${LIBODB_HEADER})
endif()
file(WRITE ${LIBODB_HEADER_PATH} ${LIBODB_HEADER})
file(WRITE ${LIBODB_HEADER_PATH} "${LIBODB_HEADER}")

vcpkg_copy_pdbs()
2 changes: 1 addition & 1 deletion ports/signalrclient/0001_cmake.patch
Expand Up @@ -26,7 +26,7 @@ index 8c73730..4cd9074 100644
+else()
+ file(READ include/signalrclient/_exports.h EXPORTS_H)
+ string(REPLACE "#ifdef NO_SIGNALRCLIENT_EXPORTS" "#if 1" EXPORTS_H_2 ${EXPORTS_H})
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/_exports.h ${EXPORTS_H_2})
+ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/_exports.h "${EXPORTS_H_2}")
+
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/_exports.h DESTINATION include/signalrclient)
+endif()
Expand Down
2 changes: 1 addition & 1 deletion ports/signalrclient/CONTROL
@@ -1,4 +1,4 @@
Source: signalrclient
Version: 1.0.0-beta1-3
Version: 1.0.0-beta1-4
Build-Depends: cpprestsdk
Description: C++ client for SignalR.
6 changes: 0 additions & 6 deletions ports/signalrclient/portfile.cmake
@@ -1,17 +1,11 @@
include(vcpkg_common_functions)
set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/SignalR-Client-Cpp-1.0.0-beta1)


vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO SignalR/SignalR-Client-Cpp
REF 1.0.0-beta1
SHA512 b38f6f946f1499080071949cbcf574405118f9acfb469441e5b5b0df3e5f0d277a83b30e0d613dc5e54732b9071e3273dac1ee65129f994d5a60eef0e45bdf6c
HEAD_REF master
)

vcpkg_apply_patches(
SOURCE_PATH ${SOURCE_PATH}
PATCHES
${CMAKE_CURRENT_LIST_DIR}/0001_cmake.patch
)
Expand Down

0 comments on commit 98e8c22

Please sign in to comment.