mirror of https://github.com/microsoft/vcpkg.git
[dimcli] Fix Windows builds. Avoid writing to source directory.
This commit is contained in:
parent
b93fb28e7c
commit
9e9fc7a9b3
|
|
@ -1,3 +1,3 @@
|
|||
Source: dimcli
|
||||
Version: 3.1.1-1
|
||||
Version: 3.1.1-2
|
||||
Description: C++ command line parser toolkit
|
||||
|
|
|
|||
|
|
@ -0,0 +1,23 @@
|
|||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 2f319ee..a38eca2 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -264,7 +264,7 @@ endfunction()
|
||||
# "-1.2.3" from the that vcpkg likes to add when building things.
|
||||
get_filename_component(prjname "${CMAKE_CURRENT_SOURCE_DIR}" NAME)
|
||||
string(REGEX REPLACE "(-[\.0-9\-]*)$" "" prjname ${prjname})
|
||||
-project(${prjname})
|
||||
+project(dimcli)
|
||||
string(TOUPPER "${prjname}" DEFINE_PREFIX)
|
||||
|
||||
get_property(parent DIRECTORY PROPERTY PARENT_DIRECTORY)
|
||||
@@ -323,9 +323,6 @@ set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
set_property(GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER cmake)
|
||||
|
||||
set(CMAKE_CONFIGURATION_TYPES Debug Release)
|
||||
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
|
||||
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/bin)
|
||||
-set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/bin)
|
||||
|
||||
if(MSVC)
|
||||
# "/EHsc" - exceptions from c++ only (not from structured or "C")
|
||||
|
|
@ -3,17 +3,27 @@ include(vcpkg_common_functions)
|
|||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO gknowles/dimcli
|
||||
REF v3.1.1
|
||||
REF v3.1.1
|
||||
SHA512 ed9aeedc59a9d48c59aa8dd1adb9cb110771c1eab0bbab8f8b518e12a45cdafb0ea94301d082ed3a033ca2428c19c8d990c76f666d1e9822cddf6e744f1db701
|
||||
HEAD_REF master
|
||||
PATCHES
|
||||
"${CMAKE_CURRENT_LIST_DIR}/fix-cmake.patch"
|
||||
)
|
||||
set(staticCrt OFF)
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL static)
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL "static")
|
||||
set(staticCrt ON)
|
||||
endif()
|
||||
|
||||
if(VCPKG_LIBRARY_LINKAGE STREQUAL "dynamic")
|
||||
set(ENV{_CL_} "/DDIMCLI_LIB_DYN_LINK")
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
OPTIONS -DLINK_STATIC_RUNTIME:BOOL=${staticCrt} -DINSTALL_LIBS:BOOL=ON
|
||||
OPTIONS
|
||||
-DLINK_STATIC_RUNTIME:BOOL=${staticCrt}
|
||||
-DINSTALL_LIBS:BOOL=ON
|
||||
-DRECURSIVE_GENERATE=ON
|
||||
)
|
||||
|
||||
vcpkg_install_cmake()
|
||||
|
|
@ -22,6 +32,8 @@ vcpkg_install_cmake()
|
|||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
|
||||
|
||||
# Handle copyright
|
||||
file(INSTALL "${SOURCE_PATH}/LICENSE"
|
||||
file(
|
||||
INSTALL "${SOURCE_PATH}/LICENSE"
|
||||
DESTINATION "${CURRENT_PACKAGES_DIR}/share/dimcli"
|
||||
RENAME copyright)
|
||||
RENAME copyright
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue