From eba9f6a812edb48f14b5ad931d4f909e48f5b70d Mon Sep 17 00:00:00 2001 From: Charles Barto Date: Tue, 18 Oct 2016 15:55:37 -0400 Subject: added static support to glbinding changed glbinding to support new configure --- scripts/cmake/vcpkg_configure_cmake.cmake | 25 ++++++++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 03b69e510..f956bc8da 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -30,16 +30,35 @@ function(vcpkg_configure_cmake) endif() if(DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=ON) + elseif(DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL static) + list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=OFF) endif() + list(APPEND _csc_OPTIONS "-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc" "-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8" ) - + if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) + list(APPEND _csc_OPTIONS_DEBUG + "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1" + "-DCMAKE_C_FLAGS_RELEASE=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1" + ) + list(APPEND _csc_OPTIONS_RELEASE + "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi" + "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi" + ) + elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) + list(APPEND _csc_OPTIONS_DEBUG + "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" + "-DCMAKE_C_FLAGS_RELEASE=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" + ) + list(APPEND _csc_OPTIONS_RELEASE + "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi" + "-DCMAKE_C_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi" + ) + endif() list(APPEND _csc_OPTIONS_RELEASE - "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi" - "-DCMAKE_C_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi" "-DCMAKE_SHARED_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF" "-DCMAKE_EXE_LINKER_FLAGS_RELEASE=/DEBUG /INCREMENTAL:NO /OPT:REF /OPT:ICF" ) -- cgit v1.2.3 From 4488064f81d58c34d329bb2ebdd589c3349cdd91 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 18 Oct 2016 16:17:47 -0700 Subject: [vcpkg_apply_patches] Check if patch was properly applied --- scripts/cmake/vcpkg_apply_patches.cmake | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index 939edbd14..42f7a84f9 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -13,6 +13,15 @@ function(vcpkg_apply_patches) WORKING_DIRECTORY ${_ap_SOURCE_PATH} RESULT_VARIABLE error_code ) + + if(error_code) + message(FATAL_ERROR + "Applying patch failed: ${GIT} --work-tree=. apply \"${PATCH}\" --ignore-whitespace --whitespace=nowarn --verbose\n" + "See logs for more information:\n" + " ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-out.log\n" + " ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-err.log\n") + endif() + message(STATUS "Applying patch ${PATCH} done") math(EXPR PATCHNUM "${PATCHNUM}+1") endforeach() -- cgit v1.2.3 From 6059b2bf2fbe0ca9ddfa266d48a8829228365ff0 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 18 Oct 2016 16:54:48 -0700 Subject: [vcpkg_apply_patches] Also print working dir --- scripts/cmake/vcpkg_apply_patches.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index 42f7a84f9..ad906f2a9 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -17,6 +17,7 @@ function(vcpkg_apply_patches) if(error_code) message(FATAL_ERROR "Applying patch failed: ${GIT} --work-tree=. apply \"${PATCH}\" --ignore-whitespace --whitespace=nowarn --verbose\n" + "Working Directory: ${_ap_SOURCE_PATH}\n" "See logs for more information:\n" " ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-out.log\n" " ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-err.log\n") -- cgit v1.2.3 From 7dea245b9ce2c8d1902c3905c925e4b2f0a4d38b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 18 Oct 2016 18:25:45 -0700 Subject: [vcpkg_apply_patches] Print that patch applying failed instead of FATAL_ERROR --- scripts/cmake/vcpkg_apply_patches.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index ad906f2a9..f5d4d75f1 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -15,7 +15,7 @@ function(vcpkg_apply_patches) ) if(error_code) - message(FATAL_ERROR + message(STATUS "Applying patch failed: ${GIT} --work-tree=. apply \"${PATCH}\" --ignore-whitespace --whitespace=nowarn --verbose\n" "Working Directory: ${_ap_SOURCE_PATH}\n" "See logs for more information:\n" -- cgit v1.2.3 From bcfe15ce2b29a2a31c9166bb2ee151582122d9c4 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Thu, 20 Oct 2016 15:46:32 -0700 Subject: Add two spaces in front of message() to fix formatting In Warning or Error, indented text is considered preformatted. Otherwise CMake tries to format it itself, and there are issues with whitespace in the path --- scripts/cmake/vcpkg_execute_required_process.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_execute_required_process.cmake b/scripts/cmake/vcpkg_execute_required_process.cmake index bd6e56f7b..7feff08b2 100644 --- a/scripts/cmake/vcpkg_execute_required_process.cmake +++ b/scripts/cmake/vcpkg_execute_required_process.cmake @@ -12,9 +12,9 @@ function(vcpkg_execute_required_process) file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}" NATIVE_BUILDTREES_DIR) if(error_code) message(FATAL_ERROR - "Command failed: ${vcpkg_execute_required_process_COMMAND}\n" - "Working Directory: ${vcpkg_execute_required_process_WORKING_DIRECTORY}\n" - "See logs for more information:\n" + " Command failed: ${vcpkg_execute_required_process_COMMAND}\n" + " Working Directory: ${vcpkg_execute_required_process_WORKING_DIRECTORY}\n" + " See logs for more information:\n" " ${NATIVE_BUILDTREES_DIR}\\${vcpkg_execute_required_process_LOGNAME}-out.log\n" " ${NATIVE_BUILDTREES_DIR}\\${vcpkg_execute_required_process_LOGNAME}-err.log\n") endif() -- cgit v1.2.3 From 0af6ca8123b280f082ce6286700ee1a6e5b9a0f2 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Tue, 25 Oct 2016 02:06:27 +1100 Subject: add qt5 support, working install but static linkage with RT needs to be implemented --- scripts/cmake/vcpkg_find_acquire_program.cmake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 8f974240f..230c4b1e7 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -24,6 +24,12 @@ function(vcpkg_find_acquire_program VAR) set(ARCHIVE "yasm.exe") set(NOEXTRACT ON) set(HASH 850b26be5bbbdaeaf45ac39dd27f69f1a85e600c35afbd16b9f621396b3c7a19863ea3ff316b025b578fce0a8280eef2203306a2b3e46ee1389abb65313fb720) +elseif(VAR MATCHES "JOM") +set(PROGNAME jom) +set(PATHS ${DOWNLOADS}/tools/jom/jom-1.1.1) +set(URL "http://download.qt.io/official_releases/jom/jom_1_1_1.zip") +set(ARCHIVE "jom_1_1_1.zip") +set(HASH 850b26be5bbbdaeaf45ac39dd27f69f1a85e600c35afbd16b9f621396b3c7a19863ea3ff316b025b578fce0a8280eef2203306a2b3e46ee1389abb65313fb720) else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() -- cgit v1.2.3 From 0f0c0b7ad9e712473bde78b7ebf9700a667b3027 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 24 Oct 2016 17:06:33 -0700 Subject: [vcpkg_apply_patches] Specify git-dir to avoid errors due to invalid git repo --- scripts/cmake/vcpkg_apply_patches.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index f5d4d75f1..731909834 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -7,7 +7,7 @@ function(vcpkg_apply_patches) message(STATUS "Applying patch ${PATCH}") set(LOGNAME patch-${TARGET_TRIPLET}-${PATCHNUM}) execute_process( - COMMAND ${GIT} --work-tree=. apply "${PATCH}" --ignore-whitespace --whitespace=nowarn --verbose + COMMAND ${GIT} --work-tree=. --git-dir=. apply "${PATCH}" --ignore-whitespace --whitespace=nowarn --verbose OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-out.log ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-err.log WORKING_DIRECTORY ${_ap_SOURCE_PATH} -- cgit v1.2.3 From 8dbeacd5ad5d9a1d5719f9e84c1f91ee93a2d37d Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Tue, 25 Oct 2016 12:39:50 +1100 Subject: static linkage and jom fixes --- scripts/cmake/vcpkg_find_acquire_program.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 230c4b1e7..0e993b78b 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -25,11 +25,11 @@ function(vcpkg_find_acquire_program VAR) set(NOEXTRACT ON) set(HASH 850b26be5bbbdaeaf45ac39dd27f69f1a85e600c35afbd16b9f621396b3c7a19863ea3ff316b025b578fce0a8280eef2203306a2b3e46ee1389abb65313fb720) elseif(VAR MATCHES "JOM") -set(PROGNAME jom) -set(PATHS ${DOWNLOADS}/tools/jom/jom-1.1.1) -set(URL "http://download.qt.io/official_releases/jom/jom_1_1_1.zip") -set(ARCHIVE "jom_1_1_1.zip") -set(HASH 850b26be5bbbdaeaf45ac39dd27f69f1a85e600c35afbd16b9f621396b3c7a19863ea3ff316b025b578fce0a8280eef2203306a2b3e46ee1389abb65313fb720) + set(PROGNAME jom) + set(PATHS ${DOWNLOADS}/tools/jom) + set(URL "http://download.qt.io/official_releases/jom/jom_1_1_1.zip") + set(ARCHIVE "jom_1_1_1.zip") + set(HASH 23a26dc7e29979bec5dcd3bfcabf76397b93ace64f5d46f2254d6420158bac5eff1c1a8454e3427e7a2fe2c233c5f2cffc87b376772399e12e40b51be2c065f4) else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() -- cgit v1.2.3 From dffedfaa320a0e73f2f4e455d0ef8fba7e72d75c Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Mon, 24 Oct 2016 21:13:30 -0700 Subject: [vcpkg_apply_patches] Improve error message from failed patch apply. --- scripts/cmake/vcpkg_apply_patches.cmake | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index 731909834..2ebf4266e 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -16,11 +16,10 @@ function(vcpkg_apply_patches) if(error_code) message(STATUS - "Applying patch failed: ${GIT} --work-tree=. apply \"${PATCH}\" --ignore-whitespace --whitespace=nowarn --verbose\n" - "Working Directory: ${_ap_SOURCE_PATH}\n" - "See logs for more information:\n" - " ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-out.log\n" - " ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-err.log\n") + "Applying patch failed: ${GIT} --work-tree=. --git-dir=. apply \"${PATCH}\" --ignore-whitespace --whitespace=nowarn --verbose\n" + "-- Working Directory: ${_ap_SOURCE_PATH}\n" + "-- This is expected if this patch was previously applied.\n" + "-- See logs for more information: ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-out.log ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-err.log") endif() message(STATUS "Applying patch ${PATCH} done") -- cgit v1.2.3 From 162ba52f43d2463150bbf81d65ae218a1df11814 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Tue, 25 Oct 2016 20:56:02 +1100 Subject: need a function to repeatedly build up to a number of failures, since qt builds are so flaky --- scripts/cmake/vcpkg_common_functions.cmake | 3 ++- .../vcpkg_execute_required_process_repeat.cmake | 28 ++++++++++++++++++++++ scripts/cmake/vcpkg_find_acquire_program.cmake | 2 +- 3 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 scripts/cmake/vcpkg_execute_required_process_repeat.cmake (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index 59824eb17..f1bbdb9e3 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -1,10 +1,11 @@ include(vcpkg_download_distfile) include(vcpkg_extract_source_archive) include(vcpkg_execute_required_process) +include(vcpkg_execute_required_process_repeat) include(vcpkg_find_acquire_program) include(vcpkg_build_cmake) include(vcpkg_build_msbuild) include(vcpkg_install_cmake) include(vcpkg_configure_cmake) include(vcpkg_apply_patches) -include(vcpkg_copy_pdbs) \ No newline at end of file +include(vcpkg_copy_pdbs) diff --git a/scripts/cmake/vcpkg_execute_required_process_repeat.cmake b/scripts/cmake/vcpkg_execute_required_process_repeat.cmake new file mode 100644 index 000000000..562265ee2 --- /dev/null +++ b/scripts/cmake/vcpkg_execute_required_process_repeat.cmake @@ -0,0 +1,28 @@ +# Usage: vcpkg_execute_required_process_repeat(COUNT COMMAND [...] WORKING_DIRECTORY LOGNAME ) +function(vcpkg_execute_required_process_repeat) + cmake_parse_arguments(vcpkg_execute_required_process_repeat "" "COUNT;WORKING_DIRECTORY;LOGNAME" "COMMAND" ${ARGN}) + #debug_message("vcpkg_execute_required_process_repeat(${vcpkg_execute_required_process_repeat_COMMAND})") + foreach(loop_count RANGE ${vcpkg_execute_required_process_repeat_COUNT}) + execute_process( + COMMAND ${vcpkg_execute_required_process_repeat_COMMAND} + OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_repeat_LOGNAME}-out.log + ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process__repeat_LOGNAME}-err.log + RESULT_VARIABLE error_code + WORKING_DIRECTORY ${vcpkg_execute_required_process_repeat_WORKING_DIRECTORY}) + #debug_message("error_code=${error_code}") + file(TO_NATIVE_PATH "${CURRENT_BUILDTREES_DIR}" NATIVE_BUILDTREES_DIR) + if(NOT error_code) + set(SUCCESSFUL_EXECUTION TRUE) + break() + endif() + endforeach(loop_count) + if (NOT ${SUCCESSFUL_EXECUTION}) + message(FATAL_ERROR + " Command failed: ${vcpkg_execute_required_process_repeat_COMMAND}\n" + " Working Directory: ${vcpkg_execute_required_process_repeat_WORKING_DIRECTORY}\n" + " See logs for more information:\n" + " ${NATIVE_BUILDTREES_DIR}\\${vcpkg_execute_required_process_repeat_LOGNAME}-out.log\n" + " ${NATIVE_BUILDTREES_DIR}\\${vcpkg_execute_required_process_repeat_LOGNAME}-err.log\n" + ) + endif() +endfunction() diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 0e993b78b..337cc04a5 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -24,7 +24,7 @@ function(vcpkg_find_acquire_program VAR) set(ARCHIVE "yasm.exe") set(NOEXTRACT ON) set(HASH 850b26be5bbbdaeaf45ac39dd27f69f1a85e600c35afbd16b9f621396b3c7a19863ea3ff316b025b578fce0a8280eef2203306a2b3e46ee1389abb65313fb720) -elseif(VAR MATCHES "JOM") + elseif(VAR MATCHES "JOM") set(PROGNAME jom) set(PATHS ${DOWNLOADS}/tools/jom) set(URL "http://download.qt.io/official_releases/jom/jom_1_1_1.zip") -- cgit v1.2.3 From 095afa2ff154f67dee28420b0cb5abd426801734 Mon Sep 17 00:00:00 2001 From: Barath Kannan Date: Tue, 25 Oct 2016 22:31:27 +1100 Subject: incorrect error file variable --- scripts/cmake/vcpkg_execute_required_process_repeat.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_execute_required_process_repeat.cmake b/scripts/cmake/vcpkg_execute_required_process_repeat.cmake index 562265ee2..d6fba132d 100644 --- a/scripts/cmake/vcpkg_execute_required_process_repeat.cmake +++ b/scripts/cmake/vcpkg_execute_required_process_repeat.cmake @@ -6,7 +6,7 @@ function(vcpkg_execute_required_process_repeat) execute_process( COMMAND ${vcpkg_execute_required_process_repeat_COMMAND} OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_repeat_LOGNAME}-out.log - ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process__repeat_LOGNAME}-err.log + ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${vcpkg_execute_required_process_repeat_LOGNAME}-err.log RESULT_VARIABLE error_code WORKING_DIRECTORY ${vcpkg_execute_required_process_repeat_WORKING_DIRECTORY}) #debug_message("error_code=${error_code}") -- cgit v1.2.3 From 600e11d83cc8d66dc15f871ffa0b973978871910 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 31 Oct 2016 12:29:41 -0700 Subject: [vcpkg_copy_pdbs] Branch on dynamic/static. Resolves #224 --- scripts/cmake/vcpkg_copy_pdbs.cmake | 47 ++++++++++++++++++++----------------- 1 file changed, 25 insertions(+), 22 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_copy_pdbs.cmake b/scripts/cmake/vcpkg_copy_pdbs.cmake index b99649d59..10cd1b2d3 100644 --- a/scripts/cmake/vcpkg_copy_pdbs.cmake +++ b/scripts/cmake/vcpkg_copy_pdbs.cmake @@ -1,4 +1,5 @@ function(vcpkg_copy_pdbs) + function(merge_filelist OUTVAR INVAR) set(MSG "") foreach(VAR ${${INVAR}}) @@ -7,32 +8,34 @@ function(vcpkg_copy_pdbs) set(${OUTVAR} ${MSG} PARENT_SCOPE) endfunction() - file(GLOB_RECURSE DLLS ${CURRENT_PACKAGES_DIR}/bin/*.dll ${CURRENT_PACKAGES_DIR}/debug/bin/*.dll) + if(VCPKG_LIBRARY_LINKAGE STREQUAL dynamic) + file(GLOB_RECURSE DLLS ${CURRENT_PACKAGES_DIR}/bin/*.dll ${CURRENT_PACKAGES_DIR}/debug/bin/*.dll) - set(DLLS_WITHOUT_MATCHING_PDBS) + set(DLLS_WITHOUT_MATCHING_PDBS) - foreach(DLL ${DLLS}) - execute_process(COMMAND dumpbin /PDBPATH ${DLL} - COMMAND findstr PDB - OUTPUT_VARIABLE PDB_LINE - ERROR_QUIET - RESULT_VARIABLE error_code - ) + foreach(DLL ${DLLS}) + execute_process(COMMAND dumpbin /PDBPATH ${DLL} + COMMAND findstr PDB + OUTPUT_VARIABLE PDB_LINE + ERROR_QUIET + RESULT_VARIABLE error_code + ) - if(NOT error_code AND PDB_LINE MATCHES "PDB file found at") - string(REGEX MATCH '.*' PDB_PATH ${PDB_LINE}) # Extract the path which is in single quotes - string(REPLACE ' "" PDB_PATH ${PDB_PATH}) # Remove single quotes - get_filename_component(DLL_DIR ${DLL} DIRECTORY) - file(COPY ${PDB_PATH} DESTINATION ${DLL_DIR}) - else() - list(APPEND DLLS_WITHOUT_MATCHING_PDBS ${DLL}) - endif() - endforeach() + if(NOT error_code AND PDB_LINE MATCHES "PDB file found at") + string(REGEX MATCH '.*' PDB_PATH ${PDB_LINE}) # Extract the path which is in single quotes + string(REPLACE ' "" PDB_PATH ${PDB_PATH}) # Remove single quotes + get_filename_component(DLL_DIR ${DLL} DIRECTORY) + file(COPY ${PDB_PATH} DESTINATION ${DLL_DIR}) + else() + list(APPEND DLLS_WITHOUT_MATCHING_PDBS ${DLL}) + endif() + endforeach() - list(LENGTH DLLS_WITHOUT_MATCHING_PDBS UNMATCHED_DLLS_LENGTH) - if(UNMATCHED_DLLS_LENGTH GREATER 0) - merge_filelist(MSG DLLS_WITHOUT_MATCHING_PDBS) - message(STATUS "Warning: Could not find a matching pdb file for:\n${MSG}") + list(LENGTH DLLS_WITHOUT_MATCHING_PDBS UNMATCHED_DLLS_LENGTH) + if(UNMATCHED_DLLS_LENGTH GREATER 0) + merge_filelist(MSG DLLS_WITHOUT_MATCHING_PDBS) + message(STATUS "Warning: Could not find a matching pdb file for:\n${MSG}") + endif() endif() endfunction() \ No newline at end of file -- cgit v1.2.3 From b04b264f29a80dceeb7c855c66653ac947f9b6f1 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 31 Oct 2016 16:18:30 -0700 Subject: [vcpkg_configure_cmake] Fix C_FLAGS --- scripts/cmake/vcpkg_configure_cmake.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index f956bc8da..901e57368 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -42,7 +42,7 @@ function(vcpkg_configure_cmake) if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND _csc_OPTIONS_DEBUG "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1" - "-DCMAKE_C_FLAGS_RELEASE=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1" + "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MDd /Zi /Ob0 /Od /RTC1" ) list(APPEND _csc_OPTIONS_RELEASE "-DCMAKE_CXX_FLAGS_RELEASE=/MD /O2 /Oi /Gy /DNDEBUG /Zi" @@ -51,7 +51,7 @@ function(vcpkg_configure_cmake) elseif(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL static) list(APPEND _csc_OPTIONS_DEBUG "-DCMAKE_CXX_FLAGS_DEBUG=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" - "-DCMAKE_C_FLAGS_RELEASE=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" + "-DCMAKE_C_FLAGS_DEBUG=/D_DEBUG /MTd /Zi /Ob0 /Od /RTC1" ) list(APPEND _csc_OPTIONS_RELEASE "-DCMAKE_CXX_FLAGS_RELEASE=/MT /O2 /Oi /Gy /DNDEBUG /Zi" -- cgit v1.2.3 From b25c13c1551456dc89ca959c7133b1cc6117532e Mon Sep 17 00:00:00 2001 From: Charles Barto Date: Tue, 1 Nov 2016 19:19:05 -0400 Subject: made some qt5 fixes --- scripts/cmake/vcpkg_find_acquire_program.cmake | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 337cc04a5..633721f0e 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -24,6 +24,12 @@ function(vcpkg_find_acquire_program VAR) set(ARCHIVE "yasm.exe") set(NOEXTRACT ON) set(HASH 850b26be5bbbdaeaf45ac39dd27f69f1a85e600c35afbd16b9f621396b3c7a19863ea3ff316b025b578fce0a8280eef2203306a2b3e46ee1389abb65313fb720) + elseif(VAR MATCHES "PYTHON3") + set(PROGNAME python) + set(PATHS ${DOWNLOADS}/tools/python) + set(URL "https://www.python.org/ftp/python/3.5.2/python-3.5.2-embed-amd64.zip") + set(ARCHIVE "python-3.5.2-embed-amd64.zip") + set(HASH 48bdcb6f94c993acad6782ee33ad4a07a0ea3b9b1bfcdeadf446d459a9224336837e2e7b518d54d8d99c5c3f4e9f8877ea1789cae513fa2eda2a3cad9e4dfd8f) elseif(VAR MATCHES "JOM") set(PROGNAME jom) set(PATHS ${DOWNLOADS}/tools/jom) -- cgit v1.2.3 From d7ff71610b5eed96c86374ad0fb41857a49839cb Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 2 Nov 2016 16:49:15 -0700 Subject: [vcpkg-apply-patches] Correct issue with src directories which contain a config\ folder. Reduce verbosity of output. --- scripts/cmake/vcpkg_apply_patches.cmake | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index 2ebf4266e..cd3026b6a 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -7,19 +7,15 @@ function(vcpkg_apply_patches) message(STATUS "Applying patch ${PATCH}") set(LOGNAME patch-${TARGET_TRIPLET}-${PATCHNUM}) execute_process( - COMMAND ${GIT} --work-tree=. --git-dir=. apply "${PATCH}" --ignore-whitespace --whitespace=nowarn --verbose + COMMAND ${GIT} --work-tree=. --git-dir=.git apply "${PATCH}" --ignore-whitespace --whitespace=nowarn --verbose OUTPUT_FILE ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-out.log ERROR_FILE ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-err.log WORKING_DIRECTORY ${_ap_SOURCE_PATH} RESULT_VARIABLE error_code ) - + if(error_code) - message(STATUS - "Applying patch failed: ${GIT} --work-tree=. --git-dir=. apply \"${PATCH}\" --ignore-whitespace --whitespace=nowarn --verbose\n" - "-- Working Directory: ${_ap_SOURCE_PATH}\n" - "-- This is expected if this patch was previously applied.\n" - "-- See logs for more information: ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-out.log ${CURRENT_BUILDTREES_DIR}/${LOGNAME}-err.log") + message(STATUS "Applying patch failed. This is expected if this patch was previously applied.") endif() message(STATUS "Applying patch ${PATCH} done") -- cgit v1.2.3 From 60c61d9305e6e5cddbd130863c2ded67ad7cc0c4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Fri, 11 Nov 2016 01:15:14 +0100 Subject: Add /m switch to vcpkg_build_msbuild.cmake (https://github.com/Microsoft/vcpkg/issues/258#issuecomment-259018977) --- scripts/cmake/vcpkg_build_msbuild.cmake | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake index 5b422fe5e..df255c745 100644 --- a/scripts/cmake/vcpkg_build_msbuild.cmake +++ b/scripts/cmake/vcpkg_build_msbuild.cmake @@ -55,6 +55,7 @@ function(vcpkg_build_msbuild) /p:Configuration=${_csc_RELEASE_CONFIGURATION} /p:Platform=${_csc_PLATFORM} /p:VCPkgLocalAppDataDisabled=true + /m WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME build-${TARGET_TRIPLET}-rel ) @@ -66,7 +67,8 @@ function(vcpkg_build_msbuild) /p:Configuration=${_csc_DEBUG_CONFIGURATION} /p:Platform=${_csc_PLATFORM} /p:VCPkgLocalAppDataDisabled=true + /m WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME build-${TARGET_TRIPLET}-dbg ) -endfunction() \ No newline at end of file +endfunction() -- cgit v1.2.3 From 34c585901ed8c32d8c7b1243225c1eee97ab3026 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5rten=20Nordheim?= Date: Fri, 11 Nov 2016 01:14:01 +0100 Subject: Add /m switch to vcpkg_install_cmake (https://github.com/Microsoft/vcpkg/issues/258#issuecomment-259839046) --- scripts/cmake/vcpkg_install_cmake.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_install_cmake.cmake b/scripts/cmake/vcpkg_install_cmake.cmake index 14f1bc94d..30aff0fe1 100644 --- a/scripts/cmake/vcpkg_install_cmake.cmake +++ b/scripts/cmake/vcpkg_install_cmake.cmake @@ -1,7 +1,7 @@ function(vcpkg_install_cmake) message(STATUS "Package ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release --target install + COMMAND ${CMAKE_COMMAND} --build . --config Release --target install -- /m WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME package-${TARGET_TRIPLET}-rel ) @@ -9,7 +9,7 @@ function(vcpkg_install_cmake) message(STATUS "Package ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug --target install + COMMAND ${CMAKE_COMMAND} --build . --config Debug --target install -- /m WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME package-${TARGET_TRIPLET}-dbg ) -- cgit v1.2.3 From d933562a584a9acb47dde9ba7e41f0128cb8763b Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 28 Nov 2016 17:17:28 -0800 Subject: Move PYTHON2 "acquisition" to vcpkg_find_acquire_program --- scripts/cmake/vcpkg_find_acquire_program.cmake | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 633721f0e..b192bc5d7 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -30,6 +30,28 @@ function(vcpkg_find_acquire_program VAR) set(URL "https://www.python.org/ftp/python/3.5.2/python-3.5.2-embed-amd64.zip") set(ARCHIVE "python-3.5.2-embed-amd64.zip") set(HASH 48bdcb6f94c993acad6782ee33ad4a07a0ea3b9b1bfcdeadf446d459a9224336837e2e7b518d54d8d99c5c3f4e9f8877ea1789cae513fa2eda2a3cad9e4dfd8f) + elseif(VAR MATCHES "PYTHON2") + find_program(PYTHON2 NAMES python2 python PATHS C:/python27 ENV PYTHON) + if(NOT PYTHON2 MATCHES "NOTFOUND") + execute_process( + COMMAND ${PYTHON2} --version + OUTPUT_VARIABLE PYTHON_VER_CHECK_OUT + ERROR_VARIABLE PYTHON_VER_CHECK_ERR + ) + set(PYTHON_VER_CHECK "${PYTHON_VER_CHECK_OUT}${PYTHON_VER_CHECK_ERR}") + debug_message("PYTHON_VER_CHECK=${PYTHON_VER_CHECK}") + if(NOT PYTHON_VER_CHECK MATCHES "Python 2.7") + set(PYTHON2 PYTHON2-NOTFOUND) + find_program(PYTHON2 NAMES python2 python PATHS C:/python27 ENV PYTHON NO_SYSTEM_ENVIRONMENT_PATH) + endif() + endif() + if(PYTHON2 MATCHES "NOTFOUND") + message(FATAL_ERROR "libuv uses the GYP build system, which requires Python 2.7.\n" + "Python 2.7 was not found in the path or by searching inside C:\\Python27.\n" + "There is no portable redistributable for Python 2.7, so you will need to install the MSI located at:\n" + " https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi\n" + ) + endif() elseif(VAR MATCHES "JOM") set(PROGNAME jom) set(PATHS ${DOWNLOADS}/tools/jom) -- cgit v1.2.3 From 5359a542a554668de7926a1b2c9a314db8b4d302 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 6 Dec 2016 01:26:21 -0800 Subject: [vcpkg] Disable all interactions with CMake registry -- we are effectively implementing our own registry and they don't nest very well at all. Fixes #334. --- scripts/cmake/vcpkg_configure_cmake.cmake | 3 +++ 1 file changed, 3 insertions(+) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 901e57368..2c506ad94 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -38,6 +38,9 @@ function(vcpkg_configure_cmake) list(APPEND _csc_OPTIONS "-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc" "-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8" + "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" + "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" + "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" ) if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND _csc_OPTIONS_DEBUG -- cgit v1.2.3 From 31b713ca1fe74f784f01cdc6ed0cfdaf4a5fcaf7 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 7 Dec 2016 21:40:36 -0800 Subject: [vcpkg] Remove all instances of TRIPLET_SYSTEM_NAME; use VCPKG_CMAKE_SYSTEM_NAME instead. --- scripts/cmake/vcpkg_configure_cmake.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 2c506ad94..179703172 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -4,11 +4,11 @@ function(vcpkg_configure_cmake) if(_csc_GENERATOR) set(GENERATOR ${_csc_GENERATOR}) - elseif(TRIPLET_SYSTEM_NAME MATCHES "uwp" AND TRIPLET_SYSTEM_ARCH MATCHES "x86") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86") set(GENERATOR "Visual Studio 14 2015") - elseif(TRIPLET_SYSTEM_NAME MATCHES "uwp" AND TRIPLET_SYSTEM_ARCH MATCHES "x64") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64") set(GENERATOR "Visual Studio 14 2015 Win64") - elseif(TRIPLET_SYSTEM_NAME MATCHES "uwp" AND TRIPLET_SYSTEM_ARCH MATCHES "arm") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm") set(GENERATOR "Visual Studio 14 2015 ARM") # elseif(NOT vcpkg_configure_cmake_NINJA MATCHES "NOTFOUND") # set(GENERATOR "Ninja") -- cgit v1.2.3 From f4c34bb42dd0fe8217d4d54a9a4a2eeecdb0f0f4 Mon Sep 17 00:00:00 2001 From: Silvio Date: Thu, 5 Jan 2017 23:37:37 +0100 Subject: vcpkg_apply_patches: add QUIET option --- scripts/cmake/vcpkg_apply_patches.cmake | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index cd3026b6a..d509e36ec 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -1,5 +1,26 @@ +#.rst: +# .. command:: vcpkg_apply_patches +# +# Apply a set of patches to a source tree. +# +# :: +# vcpkg_apply_patches(SOURCE_PATH +# PATCHES patch1 [patch ...] +# ) +# +# ``SOURCE_PATH`` +# The source path in which apply the patches. +# ``PATCHES`` +# A list of patches that are applied to the source tree +# ``QUIET`` +# If this option is passed, the warning message when applyng +# a patch failes is not printed. This is convenient for patches +# that are known to fail even on a clean source tree, and for +# which the standard warning message would be confusing for the user. +# + function(vcpkg_apply_patches) - cmake_parse_arguments(_ap "" "SOURCE_PATH" "PATCHES" ${ARGN}) + cmake_parse_arguments(_ap "QUIET" "SOURCE_PATH" "PATCHES" ${ARGN}) find_program(GIT git) set(PATCHNUM 0) @@ -14,7 +35,7 @@ function(vcpkg_apply_patches) RESULT_VARIABLE error_code ) - if(error_code) + if(error_code AND NOT ${_ap_QUIET}) message(STATUS "Applying patch failed. This is expected if this patch was previously applied.") endif() -- cgit v1.2.3 From 1decb1b52c023cc56e475ea05ec533ae65ce3c8a Mon Sep 17 00:00:00 2001 From: Silvio Date: Thu, 5 Jan 2017 23:38:01 +0100 Subject: cmake: add qmake-related helpers function --- scripts/cmake/vcpkg_build_qmake.cmake | 36 ++++++++++++++++++++++++ scripts/cmake/vcpkg_common_functions.cmake | 2 ++ scripts/cmake/vcpkg_configure_qmake.cmake | 44 ++++++++++++++++++++++++++++++ 3 files changed, 82 insertions(+) create mode 100644 scripts/cmake/vcpkg_build_qmake.cmake create mode 100644 scripts/cmake/vcpkg_configure_qmake.cmake (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_build_qmake.cmake b/scripts/cmake/vcpkg_build_qmake.cmake new file mode 100644 index 000000000..263200423 --- /dev/null +++ b/scripts/cmake/vcpkg_build_qmake.cmake @@ -0,0 +1,36 @@ +#.rst: +# .. command:: vcpkg_build_qmake +# +# Build a qmake-based project, previously configured using vcpkg_configure_qmake . +# As the CONFIG qmake option is assumed to be "debug_and_release" (the default value on Windows, see [1]), +# both the debug and release libraries are build in the same build tree. +# +# :: +# vcpkg_build_qmake() +# +# +# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html + +function(vcpkg_build_qmake) + vcpkg_find_acquire_program("JOM") + + if(NOT JOM) + BUILD_ERROR("vcpkg_install_qmake: impossible to find jom.") + endif() + + # Make sure that the linker finds the libraries used + set(ENV_LIB_BACKUP ENV{LIB}) + set(ENV{LIB} "${CURRENT_INSTALLED_DIR}/lib;${CURRENT_INSTALLED_DIR}/debug/lib;$ENV{LIB}") + + message(STATUS "Package ${TARGET_TRIPLET}") + vcpkg_execute_required_process_repeat( + COUNT 2 + COMMAND ${JOM} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} + LOGNAME package-${TARGET_TRIPLET} + ) + message(STATUS "Package ${TARGET_TRIPLET} done") + + # Restore the original value of ENV{LIB} + set(ENV{LIB} ENV_LIB_BACKUP) +endfunction() diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index f1bbdb9e3..ff1fae953 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -5,7 +5,9 @@ include(vcpkg_execute_required_process_repeat) include(vcpkg_find_acquire_program) include(vcpkg_build_cmake) include(vcpkg_build_msbuild) +include(vcpkg_build_qmake) include(vcpkg_install_cmake) include(vcpkg_configure_cmake) +include(vcpkg_configure_qmake) include(vcpkg_apply_patches) include(vcpkg_copy_pdbs) diff --git a/scripts/cmake/vcpkg_configure_qmake.cmake b/scripts/cmake/vcpkg_configure_qmake.cmake new file mode 100644 index 000000000..f51a2f4fb --- /dev/null +++ b/scripts/cmake/vcpkg_configure_qmake.cmake @@ -0,0 +1,44 @@ +#.rst: +# .. command:: vcpkg_configure_qmake +# +# Configure a qmake-based project. +# It is assume that the qmake project CONFIG variable is +# "debug_and_release" (the default value on Windows, see [1]). +# Using this option, only one Makefile for building both Release and Debug +# libraries is generated, that then can be run using the vcpkg_install_qmake +# command. +# +# :: +# vcpkg_configure_qmake(SOURCE_PATH +# [OPTIONS arg1 [arg2 ...]] +# ) +# +# ``PROJECT_PATH`` +# The path to the *.pro qmake project file. +# ``OPTIONS`` +# The options passed to qmake. +# +# [1] : http://doc.qt.io/qt-5/qmake-variable-reference.html + +function(vcpkg_configure_qmake) + cmake_parse_arguments(_csc "" "SOURCE_PATH" "OPTIONS" ${ARGN}) + + # Find qmake exectuable + find_program(QMAKE_COMMAND NAMES qmake) + + if(NOT QMAKE_COMMAND) + BUILD_ERROR("vcpkg_configure_qmake: impossible to find qmake.") + endif() + + # Cleanup build directories + file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + + message(STATUS "Configuring ${TARGET_TRIPLET}") + file(MAKE_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}) + vcpkg_execute_required_process( + COMMAND ${QMAKE_COMMAND} ${_csc_SOURCE_PATH} ${_csc_OPTIONS} + WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET} + LOGNAME config-${TARGET_TRIPLET} + ) + message(STATUS "Configuring ${TARGET_TRIPLET} done") +endfunction() \ No newline at end of file -- cgit v1.2.3 From c5dad5306e684972db7456033a7d4b2b920075a3 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 6 Jan 2017 14:57:45 -0800 Subject: [vcpkg_apply_pathces] Fix typo (also trailing whitespace) --- scripts/cmake/vcpkg_apply_patches.cmake | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_apply_patches.cmake b/scripts/cmake/vcpkg_apply_patches.cmake index d509e36ec..e17d53b08 100644 --- a/scripts/cmake/vcpkg_apply_patches.cmake +++ b/scripts/cmake/vcpkg_apply_patches.cmake @@ -11,11 +11,11 @@ # ``SOURCE_PATH`` # The source path in which apply the patches. # ``PATCHES`` -# A list of patches that are applied to the source tree -# ``QUIET`` -# If this option is passed, the warning message when applyng -# a patch failes is not printed. This is convenient for patches -# that are known to fail even on a clean source tree, and for +# A list of patches that are applied to the source tree +# ``QUIET`` +# If this option is passed, the warning message when applyng +# a patch fails is not printed. This is convenient for patches +# that are known to fail even on a clean source tree, and for # which the standard warning message would be confusing for the user. # -- cgit v1.2.3 From 4f5f52ff470e83fa041ac4c6797bfa4e61ed2501 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Tue, 10 Jan 2017 16:02:53 -0800 Subject: Fix error message when looking for PYTHON2 --- scripts/cmake/vcpkg_find_acquire_program.cmake | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index b192bc5d7..83e41fe3b 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -46,8 +46,7 @@ function(vcpkg_find_acquire_program VAR) endif() endif() if(PYTHON2 MATCHES "NOTFOUND") - message(FATAL_ERROR "libuv uses the GYP build system, which requires Python 2.7.\n" - "Python 2.7 was not found in the path or by searching inside C:\\Python27.\n" + message(FATAL_ERROR "Python 2.7 was not found in the path or by searching inside C:\\Python27.\n" "There is no portable redistributable for Python 2.7, so you will need to install the MSI located at:\n" " https://www.python.org/ftp/python/2.7.11/python-2.7.11.amd64.msi\n" ) -- cgit v1.2.3 From 1911fa818225ac02affefd6e85a0626628fcf3e3 Mon Sep 17 00:00:00 2001 From: Albert Ziegenhagel Date: Wed, 11 Jan 2017 11:37:19 +0100 Subject: Acquire 7z Since 7zip is distribute as installer only (no archive) we use msiexec to extract the installer without installing it. msiexec should be available on all windows computers (located in C:/Windows/system32) --- scripts/cmake/vcpkg_find_acquire_program.cmake | 25 +++++++++++++++++++++---- 1 file changed, 21 insertions(+), 4 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index 83e41fe3b..df2f30af5 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -57,6 +57,12 @@ function(vcpkg_find_acquire_program VAR) set(URL "http://download.qt.io/official_releases/jom/jom_1_1_1.zip") set(ARCHIVE "jom_1_1_1.zip") set(HASH 23a26dc7e29979bec5dcd3bfcabf76397b93ace64f5d46f2254d6420158bac5eff1c1a8454e3427e7a2fe2c233c5f2cffc87b376772399e12e40b51be2c065f4) + elseif(VAR MATCHES "7Z") + set(PROGNAME 7z) + set(PATHS ${DOWNLOADS}/tools/7z/Files/7-Zip) + set(URL "http://7-zip.org/a/7z1604.msi") + set(ARCHIVE "7z1604.msi") + set(HASH 556f95f7566fe23704d136239e4cf5e2a26f939ab43b44145c91b70d031a088d553e5c21301f1242a2295dcde3143b356211f0108c68e65eef8572407618326d) else() message(FATAL "unknown tool ${VAR} -- unable to acquire.") endif() @@ -71,10 +77,21 @@ function(vcpkg_find_acquire_program VAR) if(DEFINED NOEXTRACT) file(COPY ${DOWNLOADS}/${ARCHIVE} DESTINATION ${DOWNLOADS}/tools/${PROGNAME}) else() - execute_process( - COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} - WORKING_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME} - ) + get_filename_component(ARCHIVE_EXTENSION ${ARCHIVE} EXT) + string(TOLOWER "${ARCHIVE_EXTENSION}" ARCHIVE_EXTENSION) + if(${ARCHIVE_EXTENSION} STREQUAL ".msi") + file(TO_NATIVE_PATH "${DOWNLOADS}/${ARCHIVE}" ARCHIVE_NATIVE_PATH) + file(TO_NATIVE_PATH "${DOWNLOADS}/tools/${PROGNAME}" DESTINATION_NATIVE_PATH) + execute_process( + COMMAND msiexec /a ${ARCHIVE_NATIVE_PATH} /qn TARGETDIR=${DESTINATION_NATIVE_PATH} + WORKING_DIRECTORY ${DOWNLOADS} + ) + else() + execute_process( + COMMAND ${CMAKE_COMMAND} -E tar xzf ${DOWNLOADS}/${ARCHIVE} + WORKING_DIRECTORY ${DOWNLOADS}/tools/${PROGNAME} + ) + endif() endif() find_program(${VAR} ${PROGNAME} PATHS ${PATHS}) -- cgit v1.2.3 From 275a59dd9dc9b6ec324ac9eb5460193bfd53b736 Mon Sep 17 00:00:00 2001 From: codicodi Date: Wed, 11 Jan 2017 21:20:53 +0100 Subject: Add glib --- scripts/cmake/vcpkg_common_functions.cmake | 1 + scripts/cmake/vcpkg_copy_tool_dependencies.cmake | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 scripts/cmake/vcpkg_copy_tool_dependencies.cmake (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_common_functions.cmake b/scripts/cmake/vcpkg_common_functions.cmake index ff1fae953..6e60bf2bc 100644 --- a/scripts/cmake/vcpkg_common_functions.cmake +++ b/scripts/cmake/vcpkg_common_functions.cmake @@ -11,3 +11,4 @@ include(vcpkg_configure_cmake) include(vcpkg_configure_qmake) include(vcpkg_apply_patches) include(vcpkg_copy_pdbs) +include(vcpkg_copy_tool_dependencies) diff --git a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake new file mode 100644 index 000000000..d8de15207 --- /dev/null +++ b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake @@ -0,0 +1,16 @@ +# Copy dlls for all tools in ${CURRENT_PACKAGES_DIR}/tools + +function(vcpkg_copy_tool_dependencies) + macro(search_for_dependencies PATH_TO_SEARCH) + file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/tools/*.exe ${CURRENT_PACKAGES_DIR}/tools/*.dll) + foreach(TOOL ${TOOLS}) + execute_process(COMMAND powershell -noprofile -executionpolicy UnRestricted -nologo + -file ${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/applocal.ps1 + -targetBinary ${TOOL} + -installedDir ${PATH_TO_SEARCH} + OUTPUT_VARIABLE OUT) + endforeach() + endmacro() + search_for_dependencies(${CURRENT_PACKAGES_DIR}/bin) + search_for_dependencies(${CURRENT_INSTALLED_DIR}/bin) +endfunction() -- cgit v1.2.3 From f4622dce99378894b71c07e7fe989480981b5d56 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 11 Jan 2017 20:54:25 -0800 Subject: [7zip] Also consider the system version, if available --- scripts/cmake/vcpkg_find_acquire_program.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index df2f30af5..ab0cf1587 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -59,7 +59,7 @@ function(vcpkg_find_acquire_program VAR) set(HASH 23a26dc7e29979bec5dcd3bfcabf76397b93ace64f5d46f2254d6420158bac5eff1c1a8454e3427e7a2fe2c233c5f2cffc87b376772399e12e40b51be2c065f4) elseif(VAR MATCHES "7Z") set(PROGNAME 7z) - set(PATHS ${DOWNLOADS}/tools/7z/Files/7-Zip) + set(PATHS "C:/Program Files/7-Zip" ${DOWNLOADS}/tools/7z/Files/7-Zip) set(URL "http://7-zip.org/a/7z1604.msi") set(ARCHIVE "7z1604.msi") set(HASH 556f95f7566fe23704d136239e4cf5e2a26f939ab43b44145c91b70d031a088d553e5c21301f1242a2295dcde3143b356211f0108c68e65eef8572407618326d) -- cgit v1.2.3 From ccd3e399f023129a39bb9a402324676a9391a970 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 14 Jan 2017 02:15:34 +0100 Subject: [glib] use win_iconv and add subdir for tools --- scripts/cmake/vcpkg_copy_tool_dependencies.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake index d8de15207..32c3eba0d 100644 --- a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake +++ b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake @@ -1,8 +1,8 @@ -# Copy dlls for all tools in ${CURRENT_PACKAGES_DIR}/tools +# Copy dlls for all tools in TOOL_DIR -function(vcpkg_copy_tool_dependencies) +function(vcpkg_copy_tool_dependencies TOOL_DIR) macro(search_for_dependencies PATH_TO_SEARCH) - file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/tools/*.exe ${CURRENT_PACKAGES_DIR}/tools/*.dll) + file(GLOB TOOLS ${TOOL_DIR}/*.exe ${TOOL_DIR}/*.dll) foreach(TOOL ${TOOLS}) execute_process(COMMAND powershell -noprofile -executionpolicy UnRestricted -nologo -file ${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/applocal.ps1 -- cgit v1.2.3 From 2bc4064b1e99b31bd550982011e251f97d5a0aef Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 13 Jan 2017 17:30:48 -0800 Subject: [vcpkg_build_cmake] Add option to specify the 64-bit toolset --- scripts/cmake/vcpkg_build_cmake.cmake | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 8ba4b9fae..eb50222ba 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -1,7 +1,16 @@ function(vcpkg_build_cmake) + cmake_parse_arguments(_bc "MSVC_64_TOOLSET" "" "" ${ARGN}) + + set(MSVC_EXTRA_ARGS) + + # Specifies the architecture of the toolset, NOT the architecture of the produced binary + if (_bc_MSVC_64_TOOLSET) + list(APPEND MSVC_EXTRA_ARGS "/p:PreferredToolArchitecture=x64") + endif() + message(STATUS "Build ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release -- /p:VCPkgLocalAppDataDisabled=true /m + COMMAND ${CMAKE_COMMAND} --build . --config Release -- /p:VCPkgLocalAppDataDisabled=true /m ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME build-${TARGET_TRIPLET}-rel ) @@ -9,7 +18,7 @@ function(vcpkg_build_cmake) message(STATUS "Build ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug -- /p:VCPkgLocalAppDataDisabled=true /m + COMMAND ${CMAKE_COMMAND} --build . --config Debug -- /p:VCPkgLocalAppDataDisabled=true /m ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME build-${TARGET_TRIPLET}-dbg ) -- cgit v1.2.3 From eb7ccc1223f568d6d2df21b27eb890be93bc8186 Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 14 Jan 2017 02:55:41 +0100 Subject: Revert "[glib] use win_iconv and add subdir for tools" This reverts commit ccd3e399f023129a39bb9a402324676a9391a970. --- scripts/cmake/vcpkg_copy_tool_dependencies.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake index 32c3eba0d..d8de15207 100644 --- a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake +++ b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake @@ -1,8 +1,8 @@ -# Copy dlls for all tools in TOOL_DIR +# Copy dlls for all tools in ${CURRENT_PACKAGES_DIR}/tools -function(vcpkg_copy_tool_dependencies TOOL_DIR) +function(vcpkg_copy_tool_dependencies) macro(search_for_dependencies PATH_TO_SEARCH) - file(GLOB TOOLS ${TOOL_DIR}/*.exe ${TOOL_DIR}/*.dll) + file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/tools/*.exe ${CURRENT_PACKAGES_DIR}/tools/*.dll) foreach(TOOL ${TOOLS}) execute_process(COMMAND powershell -noprofile -executionpolicy UnRestricted -nologo -file ${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/applocal.ps1 -- cgit v1.2.3 From f5a0a64e44b885fae8d17b811ee3d3f623ffac3e Mon Sep 17 00:00:00 2001 From: codicodi Date: Sat, 14 Jan 2017 02:59:41 +0100 Subject: [glib] tooools --- scripts/cmake/vcpkg_copy_tool_dependencies.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake index d8de15207..432e3c12a 100644 --- a/scripts/cmake/vcpkg_copy_tool_dependencies.cmake +++ b/scripts/cmake/vcpkg_copy_tool_dependencies.cmake @@ -1,8 +1,8 @@ -# Copy dlls for all tools in ${CURRENT_PACKAGES_DIR}/tools +# Copy dlls for all tools in TOOL_DIR -function(vcpkg_copy_tool_dependencies) +function(vcpkg_copy_tool_dependencies TOOL_DIR) macro(search_for_dependencies PATH_TO_SEARCH) - file(GLOB TOOLS ${CURRENT_PACKAGES_DIR}/tools/*.exe ${CURRENT_PACKAGES_DIR}/tools/*.dll) + file(GLOB TOOLS ${TOOL_DIR}/*.exe ${TOOL_DIR}/*.dll) foreach(TOOL ${TOOLS}) execute_process(COMMAND powershell -noprofile -executionpolicy UnRestricted -nologo -file ${VCPKG_ROOT_DIR}/scripts/buildsystems/msbuild/applocal.ps1 -- cgit v1.2.3 From fd0adc561dd93c2cdf0762eeefa0438537a6760a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Fri, 13 Jan 2017 19:09:42 -0800 Subject: [vcpkg_build/install_cmake] Add option to disable parallel building --- scripts/cmake/vcpkg_build_cmake.cmake | 10 +++++++--- scripts/cmake/vcpkg_install_cmake.cmake | 17 +++++++++++++++-- 2 files changed, 22 insertions(+), 5 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index eb50222ba..6d7cfe643 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -1,5 +1,5 @@ function(vcpkg_build_cmake) - cmake_parse_arguments(_bc "MSVC_64_TOOLSET" "" "" ${ARGN}) + cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN}) set(MSVC_EXTRA_ARGS) @@ -8,9 +8,13 @@ function(vcpkg_build_cmake) list(APPEND MSVC_EXTRA_ARGS "/p:PreferredToolArchitecture=x64") endif() + if (NOT _bc_DISABLE_PARALLEL) + list(APPEND MSVC_EXTRA_ARGS "/m") + endif() + message(STATUS "Build ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release -- /p:VCPkgLocalAppDataDisabled=true /m ${MSVC_EXTRA_ARGS} + COMMAND ${CMAKE_COMMAND} --build . --config Release -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME build-${TARGET_TRIPLET}-rel ) @@ -18,7 +22,7 @@ function(vcpkg_build_cmake) message(STATUS "Build ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug -- /p:VCPkgLocalAppDataDisabled=true /m ${MSVC_EXTRA_ARGS} + COMMAND ${CMAKE_COMMAND} --build . --config Debug -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME build-${TARGET_TRIPLET}-dbg ) diff --git a/scripts/cmake/vcpkg_install_cmake.cmake b/scripts/cmake/vcpkg_install_cmake.cmake index 30aff0fe1..f29f3ce5d 100644 --- a/scripts/cmake/vcpkg_install_cmake.cmake +++ b/scripts/cmake/vcpkg_install_cmake.cmake @@ -1,7 +1,20 @@ function(vcpkg_install_cmake) + cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN}) + + set(MSVC_EXTRA_ARGS) + + # Specifies the architecture of the toolset, NOT the architecture of the produced binary + if (_bc_MSVC_64_TOOLSET) + list(APPEND MSVC_EXTRA_ARGS "/p:PreferredToolArchitecture=x64") + endif() + + if (NOT _bc_DISABLE_PARALLEL) + list(APPEND MSVC_EXTRA_ARGS "/m") + endif() + message(STATUS "Package ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release --target install -- /m + COMMAND ${CMAKE_COMMAND} --build . --config Release --target install -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME package-${TARGET_TRIPLET}-rel ) @@ -9,7 +22,7 @@ function(vcpkg_install_cmake) message(STATUS "Package ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug --target install -- /m + COMMAND ${CMAKE_COMMAND} --build . --config Debug --target install -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME package-${TARGET_TRIPLET}-dbg ) -- cgit v1.2.3 From 93c3c0648a782b1fa75bae1f200beca6ba871f9a Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Mon, 23 Jan 2017 19:25:47 -0800 Subject: [VS2017] Enable building with v141 toolset --- scripts/cmake/vcpkg_configure_cmake.cmake | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 179703172..128782075 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -4,20 +4,33 @@ function(vcpkg_configure_cmake) if(_csc_GENERATOR) set(GENERATOR ${_csc_GENERATOR}) - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 Win64") - elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 ARM") # elseif(NOT vcpkg_configure_cmake_NINJA MATCHES "NOTFOUND") # set(GENERATOR "Ninja") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86") + elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015") - elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64") + elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") set(GENERATOR "Visual Studio 14 2015 Win64") elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm") - set(GENERATOR "Visual Studio 14 2015 ARM") + set(GENERATOR "Visual Studio 14 2015 ARM" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") + + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017 Win64") + elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "arm" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017 ARM") + elseif(TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017") + elseif(TRIPLET_SYSTEM_ARCH MATCHES "x64" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") + set(GENERATOR "Visual Studio 15 2017 Win64") + elseif(TRIPLET_SYSTEM_ARCH MATCHES "arm") + set(GENERATOR "Visual Studio 15 2017 ARM" AND VCPKG_PLATFORM_TOOLSET MATCHES "v141") endif() file(REMOVE_RECURSE ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg) @@ -33,7 +46,7 @@ function(vcpkg_configure_cmake) elseif(DEFINED VCPKG_LIBRARY_LINKAGE AND VCPKG_LIBRARY_LINKAGE STREQUAL static) list(APPEND _csc_OPTIONS -DBUILD_SHARED_LIBS=OFF) endif() - + list(APPEND _csc_OPTIONS "-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc" -- cgit v1.2.3 From 318d32e870f8ee25bdf71c8012115ebb9bc38361 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Tue, 24 Jan 2017 18:55:41 -0800 Subject: [vcpkg] Add user-facing notification to prompt rebuilding vcpkg.exe in face of cmake changes. --- scripts/cmake/vcpkg_configure_cmake.cmake | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 128782075..5db9b5d05 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -2,6 +2,10 @@ find_program(vcpkg_configure_cmake_NINJA ninja) function(vcpkg_configure_cmake) cmake_parse_arguments(_csc "" "SOURCE_PATH;GENERATOR" "OPTIONS;OPTIONS_DEBUG;OPTIONS_RELEASE" ${ARGN}) + if(NOT VCPKG_PLATFORM_TOOLSET) + message(FATAL_ERROR "Vcpkg has been updated with VS2017 support, however you need to rebuild vcpkg.exe by re-running bootstrap.ps1\n powershell -exec bypass scripts\\bootstrap.ps1\n") + endif() + if(_csc_GENERATOR) set(GENERATOR ${_csc_GENERATOR}) elseif(VCPKG_CMAKE_SYSTEM_NAME STREQUAL "WindowsStore" AND TRIPLET_SYSTEM_ARCH MATCHES "x86" AND VCPKG_PLATFORM_TOOLSET MATCHES "v140") -- cgit v1.2.3 From 8b602f97c83613862837d842263a17850828e953 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 25 Jan 2017 18:32:24 -0800 Subject: [vcpkg_copy_pdbs] Force output to be in en-us. Resolves #587 --- scripts/cmake/vcpkg_copy_pdbs.cmake | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_copy_pdbs.cmake b/scripts/cmake/vcpkg_copy_pdbs.cmake index 10cd1b2d3..61ad97728 100644 --- a/scripts/cmake/vcpkg_copy_pdbs.cmake +++ b/scripts/cmake/vcpkg_copy_pdbs.cmake @@ -13,6 +13,9 @@ function(vcpkg_copy_pdbs) set(DLLS_WITHOUT_MATCHING_PDBS) + set(PREVIOUS_VSLANG $ENV{VSLANG}) + set(ENV{VSLANG} 1033) + foreach(DLL ${DLLS}) execute_process(COMMAND dumpbin /PDBPATH ${DLL} COMMAND findstr PDB @@ -31,6 +34,8 @@ function(vcpkg_copy_pdbs) endif() endforeach() + set(ENV{VSLANG} ${PREVIOUS_VSLANG}) + list(LENGTH DLLS_WITHOUT_MATCHING_PDBS UNMATCHED_DLLS_LENGTH) if(UNMATCHED_DLLS_LENGTH GREATER 0) merge_filelist(MSG DLLS_WITHOUT_MATCHING_PDBS) -- cgit v1.2.3 From f2d40c5b81cba14c86d836bc21978c4f3f691538 Mon Sep 17 00:00:00 2001 From: Alexander Karatarakis Date: Wed, 1 Feb 2017 11:38:58 -0800 Subject: Download 32-bit perl instead of 64-bit. Resolves #620 --- scripts/cmake/vcpkg_find_acquire_program.cmake | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_find_acquire_program.cmake b/scripts/cmake/vcpkg_find_acquire_program.cmake index ab0cf1587..cd4a554f4 100644 --- a/scripts/cmake/vcpkg_find_acquire_program.cmake +++ b/scripts/cmake/vcpkg_find_acquire_program.cmake @@ -8,9 +8,9 @@ function(vcpkg_find_acquire_program VAR) if(VAR MATCHES "PERL") set(PROGNAME perl) set(PATHS ${DOWNLOADS}/tools/perl/perl/bin) - set(URL "http://strawberryperl.com/download/5.20.2.1/strawberry-perl-5.20.2.1-64bit-portable.zip") - set(ARCHIVE "strawberry-perl-5.20.2.1-64bit-portable.zip") - set(HASH 6e14e5580e52da5d35f29b67a52ef9db0e021af1575b4bbd84ebdbf18580522287890bdc21c0d21ddc1b2529d888f8e159dcaa017a3ff06d8fd23d16901bcc8b) + set(URL "http://strawberryperl.com/download/5.24.1.1/strawberry-perl-5.24.1.1-32bit-portable.zip") + set(ARCHIVE "strawberry-perl-5.24.1.1-32bit-portable.zip") + set(HASH a6e685ea24376f50db5f06c5b46075f1d3be25168fa1f27fa9b02e2ac017826cee62a2b43562f9b6c989337a231ba914416c110075457764de2d11f99d5e0f26) elseif(VAR MATCHES "NASM") set(PROGNAME nasm) set(PATHS ${DOWNLOADS}/tools/nasm/nasm-2.11.08) -- cgit v1.2.3 From a3eaed8f1faacc03dc5abb56d2117096d3413735 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Wed, 1 Feb 2017 16:19:27 -0800 Subject: [vcpkg] Add /MP to base compilation flags, enabling parallel builds. --- scripts/cmake/vcpkg_configure_cmake.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index 5db9b5d05..c524d12ed 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -53,8 +53,8 @@ function(vcpkg_configure_cmake) list(APPEND _csc_OPTIONS - "-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc" - "-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8" + "-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc /MP" + "-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /MP" "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" -- cgit v1.2.3 From b2b2c9136918ed3ef85961c5c2885b9562d07d1d Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Thu, 2 Feb 2017 15:41:20 -0800 Subject: [vcpkg] Override Boost_COMPILER setting for all packages and toolchain to enable mixing VS2015 and VS2017 --- scripts/cmake/vcpkg_configure_cmake.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_configure_cmake.cmake b/scripts/cmake/vcpkg_configure_cmake.cmake index c524d12ed..fbebe13a4 100644 --- a/scripts/cmake/vcpkg_configure_cmake.cmake +++ b/scripts/cmake/vcpkg_configure_cmake.cmake @@ -58,6 +58,7 @@ function(vcpkg_configure_cmake) "-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON" "-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON" + "-DBoost_COMPILER=-vc140" ) if(DEFINED VCPKG_CRT_LINKAGE AND VCPKG_CRT_LINKAGE STREQUAL dynamic) list(APPEND _csc_OPTIONS_DEBUG -- cgit v1.2.3 From f7dcbe97fffdb5e4a005de7513816fc476aeef81 Mon Sep 17 00:00:00 2001 From: Robert Schumacher Date: Fri, 3 Feb 2017 17:46:09 -0800 Subject: [vcpkg] Disable Intel MKL for all internal builds. Fixes #609. --- scripts/cmake/vcpkg_build_cmake.cmake | 11 ++++++++--- scripts/cmake/vcpkg_build_msbuild.cmake | 2 ++ 2 files changed, 10 insertions(+), 3 deletions(-) (limited to 'scripts/cmake') diff --git a/scripts/cmake/vcpkg_build_cmake.cmake b/scripts/cmake/vcpkg_build_cmake.cmake index 6d7cfe643..3e8363a2c 100644 --- a/scripts/cmake/vcpkg_build_cmake.cmake +++ b/scripts/cmake/vcpkg_build_cmake.cmake @@ -1,9 +1,14 @@ function(vcpkg_build_cmake) cmake_parse_arguments(_bc "MSVC_64_TOOLSET;DISABLE_PARALLEL" "" "" ${ARGN}) - set(MSVC_EXTRA_ARGS) + set(MSVC_EXTRA_ARGS + "/p:VCPkgLocalAppDataDisabled=true" + "/p:UseIntelMKL=No" + ) # Specifies the architecture of the toolset, NOT the architecture of the produced binary + # This can help libraries that cause the linker to run out of memory. + # https://support.microsoft.com/en-us/help/2891057/linker-fatal-error-lnk1102-out-of-memory if (_bc_MSVC_64_TOOLSET) list(APPEND MSVC_EXTRA_ARGS "/p:PreferredToolArchitecture=x64") endif() @@ -14,7 +19,7 @@ function(vcpkg_build_cmake) message(STATUS "Build ${TARGET_TRIPLET}-rel") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Release -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} + COMMAND ${CMAKE_COMMAND} --build . --config Release -- ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME build-${TARGET_TRIPLET}-rel ) @@ -22,7 +27,7 @@ function(vcpkg_build_cmake) message(STATUS "Build ${TARGET_TRIPLET}-dbg") vcpkg_execute_required_process( - COMMAND ${CMAKE_COMMAND} --build . --config Debug -- /p:VCPkgLocalAppDataDisabled=true ${MSVC_EXTRA_ARGS} + COMMAND ${CMAKE_COMMAND} --build . --config Debug -- ${MSVC_EXTRA_ARGS} WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME build-${TARGET_TRIPLET}-dbg ) diff --git a/scripts/cmake/vcpkg_build_msbuild.cmake b/scripts/cmake/vcpkg_build_msbuild.cmake index df255c745..f4a809e7f 100644 --- a/scripts/cmake/vcpkg_build_msbuild.cmake +++ b/scripts/cmake/vcpkg_build_msbuild.cmake @@ -55,6 +55,7 @@ function(vcpkg_build_msbuild) /p:Configuration=${_csc_RELEASE_CONFIGURATION} /p:Platform=${_csc_PLATFORM} /p:VCPkgLocalAppDataDisabled=true + /p:UseIntelMKL=No /m WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-rel LOGNAME build-${TARGET_TRIPLET}-rel @@ -67,6 +68,7 @@ function(vcpkg_build_msbuild) /p:Configuration=${_csc_DEBUG_CONFIGURATION} /p:Platform=${_csc_PLATFORM} /p:VCPkgLocalAppDataDisabled=true + /p:UseIntelMKL=No /m WORKING_DIRECTORY ${CURRENT_BUILDTREES_DIR}/${TARGET_TRIPLET}-dbg LOGNAME build-${TARGET_TRIPLET}-dbg -- cgit v1.2.3