aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Karatarakis <alkarata@microsoft.com>2016-11-30 12:38:13 -0800
committerAlexander Karatarakis <alkarata@microsoft.com>2016-11-30 12:38:13 -0800
commit5815a102389e84fd1bc6a6d7865ab0459d7c7a9f (patch)
treee3bab487f7dfec539d636cbf22915be89734c6eb
parent35152bb4fddc63f6166611a6a01fe7429e955743 (diff)
parent760ae1c3ce69fed82b41b8c0951567d1a4da6a3e (diff)
downloadvcpkg-5815a102389e84fd1bc6a6d7865ab0459d7c7a9f.tar.gz
vcpkg-5815a102389e84fd1bc6a6d7865ab0459d7c7a9f.zip
Merge branch 'master' of https://github.com/Microsoft/vcpkg
-rw-r--r--ports/gtest/portfile.cmake13
-rw-r--r--ports/yaml-cpp/CONTROL3
-rw-r--r--ports/yaml-cpp/portfile.cmake38
-rw-r--r--scripts/buildsystems/msbuild/vcpkg.targets8
-rw-r--r--scripts/buildsystems/vcpkg.cmake34
5 files changed, 83 insertions, 13 deletions
diff --git a/ports/gtest/portfile.cmake b/ports/gtest/portfile.cmake
index e1d601d7b..d1ba722d7 100644
--- a/ports/gtest/portfile.cmake
+++ b/ports/gtest/portfile.cmake
@@ -37,8 +37,6 @@ message(STATUS "Adding worktree and patching done")
vcpkg_configure_cmake(
SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src
- OPTIONS
- -DBUILD_SHARED_LIBS=ON
)
vcpkg_install_cmake()
@@ -55,4 +53,15 @@ file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.dll ${CURRENT_PACKAGES_
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock.dll)
file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.dll ${CURRENT_PACKAGES_DIR}/debug/bin/gmock_main.dll)
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/lib/manual-link)
+file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gtest.lib)
+file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gtest_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gtest_main.lib)
+file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock.lib)
+file(RENAME ${CURRENT_PACKAGES_DIR}/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/lib/manual-link/gmock_main.lib)
+file(MAKE_DIRECTORY ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link)
+file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtest.lib)
+file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gtest_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gtest_main.lib)
+file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock.lib)
+file(RENAME ${CURRENT_PACKAGES_DIR}/debug/lib/gmock_main.lib ${CURRENT_PACKAGES_DIR}/debug/lib/manual-link/gmock_main.lib)
+
vcpkg_copy_pdbs()
diff --git a/ports/yaml-cpp/CONTROL b/ports/yaml-cpp/CONTROL
new file mode 100644
index 000000000..f55ccfc4f
--- /dev/null
+++ b/ports/yaml-cpp/CONTROL
@@ -0,0 +1,3 @@
+Source: yaml-cpp
+Version: 0.5.4 candidate
+Description: yaml-cpp is a YAML parser and emitter in C++ matching the YAML 1.2 spec.
diff --git a/ports/yaml-cpp/portfile.cmake b/ports/yaml-cpp/portfile.cmake
new file mode 100644
index 000000000..69f838884
--- /dev/null
+++ b/ports/yaml-cpp/portfile.cmake
@@ -0,0 +1,38 @@
+# Common Ambient Variables:
+# VCPKG_ROOT_DIR = <C:\path\to\current\vcpkg>
+# TARGET_TRIPLET is the current triplet (x86-windows, etc)
+# PORT is the current port name (zlib, etc)
+# CURRENT_BUILDTREES_DIR = ${VCPKG_ROOT_DIR}\buildtrees\${PORT}
+# CURRENT_PACKAGES_DIR = ${VCPKG_ROOT_DIR}\packages\${PORT}_${TARGET_TRIPLET}
+#
+
+include(vcpkg_common_functions)
+set(SOURCE_PATH ${CURRENT_BUILDTREES_DIR}/src/yaml-cpp-380ecb404ef99ba132154ed43dd2b84136b30b14)
+vcpkg_download_distfile(ARCHIVE
+ URLS "https://github.com/jbeder/yaml-cpp/archive/380ecb404ef99ba132154ed43dd2b84136b30b14.zip"
+ FILENAME "380ecb404ef99ba132154ed43dd2b84136b30b14.zip"
+ SHA512 7e090b53ba760f4f9a44701359fe2c30c05f1bbcd2cba78a8f9a88c651b09be6d592e65826fbacb9dd7317afbe3cd968be531b89f83e79f15cd97e9c27d17232
+)
+vcpkg_extract_source_archive(${ARCHIVE})
+
+vcpkg_configure_cmake(
+ SOURCE_PATH ${SOURCE_PATH}
+ # OPTIONS -DUSE_THIS_IN_ALL_BUILDS=1 -DUSE_THIS_TOO=2
+ # OPTIONS_RELEASE -DOPTIMIZE=1
+ # OPTIONS_DEBUG -DDEBUGGABLE=1
+)
+
+vcpkg_install_cmake()
+
+vcpkg_copy_pdbs()
+
+# Remove debug include files
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
+# Remove cmake files
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/CMake)
+file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/CMake)
+
+# Handle copyright
+file(COPY ${SOURCE_PATH}/LICENSE DESTINATION ${CURRENT_PACKAGES_DIR}/share/yaml-cpp)
+file(RENAME ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/LICENSE ${CURRENT_PACKAGES_DIR}/share/yaml-cpp/copyright)
+
diff --git a/scripts/buildsystems/msbuild/vcpkg.targets b/scripts/buildsystems/msbuild/vcpkg.targets
index 18c4e9d9f..7782551c2 100644
--- a/scripts/buildsystems/msbuild/vcpkg.targets
+++ b/scripts/buildsystems/msbuild/vcpkg.targets
@@ -31,11 +31,13 @@
<ItemDefinitionGroup Condition="'$(VcpkgEnabled)' == 'true'">
<Link>
- <AdditionalDependencies Condition="'$(VcpkgConfiguration)' == 'Debug'">$(VcpkgRoot)debug\lib\*.lib;%(AdditionalDependencies)</AdditionalDependencies>
- <AdditionalDependencies Condition="'$(VcpkgConfiguration)' == 'Release'">$(VcpkgRoot)lib\*.lib;%(AdditionalDependencies)</AdditionalDependencies>
+ <AdditionalDependencies Condition="'$(VcpkgConfiguration)' == 'Debug' and '$(VcpkgAutoLink)' != 'false'">%(AdditionalDependencies);$(VcpkgRoot)debug\lib\*.lib</AdditionalDependencies>
+ <AdditionalDependencies Condition="'$(VcpkgConfiguration)' == 'Release' and '$(VcpkgAutoLink)' != 'false'">%(AdditionalDependencies);$(VcpkgRoot)lib\*.lib</AdditionalDependencies>
+ <AdditionalLibraryDirectories Condition="'$(VcpkgConfiguration)' == 'Release'">%(AdditionalLibraryDirectories);$(VcpkgRoot)lib;$(VcpkgRoot)lib\manual-link</AdditionalLibraryDirectories>
+ <AdditionalLibraryDirectories Condition="'$(VcpkgConfiguration)' == 'Debug'">%(AdditionalLibraryDirectories);$(VcpkgRoot)debug\lib;$(VcpkgRoot)debug\lib\manual-link</AdditionalLibraryDirectories>
</Link>
<ClCompile>
- <AdditionalIncludeDirectories>$(VcpkgRoot)include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>%(AdditionalIncludeDirectories);$(VcpkgRoot)include</AdditionalIncludeDirectories>
</ClCompile>
</ItemDefinitionGroup>
diff --git a/scripts/buildsystems/vcpkg.cmake b/scripts/buildsystems/vcpkg.cmake
index 54960a138..44db05a22 100644
--- a/scripts/buildsystems/vcpkg.cmake
+++ b/scripts/buildsystems/vcpkg.cmake
@@ -46,21 +46,29 @@ if(NOT VCPKG_TOOLCHAIN)
list(APPEND CMAKE_PREFIX_PATH
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug
)
+ list(APPEND CMAKE_LIBRARY_PATH
+ ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link
+ )
+ link_directories(${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/debug/lib/manual-link)
endif()
list(APPEND CMAKE_PREFIX_PATH
${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}
)
+ list(APPEND CMAKE_LIBRARY_PATH
+ ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link
+ )
+ link_directories(${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/lib/manual-link)
include_directories(${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/include)
set(CMAKE_PROGRAM_PATH ${CMAKE_PROGRAM_PATH} ${_VCPKG_INSTALLED_DIR}/${VCPKG_TARGET_TRIPLET}/tools)
- option(OVERRIDE_ADD_EXECUTABLE "Automatically copy dependencies into the output directory for executables." ON)
- if(OVERRIDE_ADD_EXECUTABLE)
- function(add_executable name)
- _add_executable(${ARGV})
- list(FIND ARGV "IMPORTED" IMPORTED_IDX)
- if(IMPORTED_IDX EQUAL -1)
+ option(VCPKG_APPLOCAL_DEPS "Automatically copy dependencies into the output directory for executables." ON)
+ function(add_executable name)
+ _add_executable(${ARGV})
+ list(FIND ARGV "IMPORTED" IMPORTED_IDX)
+ if(IMPORTED_IDX EQUAL -1)
+ if(VCPKG_APPLOCAL_DEPS)
add_custom_command(TARGET ${name} POST_BUILD
COMMAND powershell -noprofile -executionpolicy UnRestricted -file ${_VCPKG_TOOLCHAIN_DIR}/msbuild/applocal.ps1
-targetBinary $<TARGET_FILE:${name}>
@@ -68,7 +76,17 @@ if(NOT VCPKG_TOOLCHAIN)
-OutVariable out
)
endif()
- endfunction()
- endif()
+ set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false)
+ endif()
+ endfunction()
+
+ function(add_library name)
+ _add_library(${ARGV})
+ list(FIND ARGV "IMPORTED" IMPORTED_IDX)
+ if(IMPORTED_IDX EQUAL -1)
+ set_target_properties(${name} PROPERTIES VS_GLOBAL_VcpkgEnabled false)
+ endif()
+ endfunction()
+
set(VCPKG_TOOLCHAIN ON)
endif()