aboutsummaryrefslogtreecommitdiff
path: root/scripts/CMakeLists.txt
diff options
context:
space:
mode:
authorJuan Ramos <juan@lunarg.com>2023-06-26 12:53:10 -0600
committerJuan Ramos <114601453+juan-lunarg@users.noreply.github.com>2023-06-27 09:38:38 -0600
commitea8ea35f4e61ca90f5c8bec43e506ee77b9b57a7 (patch)
tree0a7e6d5d71cd601e9d85b2fa70203209ed681bea /scripts/CMakeLists.txt
parent247c806c93c720488daa0bc86acd5b6f3a0e14f9 (diff)
downloadusermoji-ea8ea35f4e61ca90f5c8bec43e506ee77b9b57a7.tar.xz
cmake: Update update_deps
Diffstat (limited to 'scripts/CMakeLists.txt')
-rw-r--r--scripts/CMakeLists.txt16
1 files changed, 7 insertions, 9 deletions
diff --git a/scripts/CMakeLists.txt b/scripts/CMakeLists.txt
index 74545673..ad467ae0 100644
--- a/scripts/CMakeLists.txt
+++ b/scripts/CMakeLists.txt
@@ -28,15 +28,9 @@ if (UPDATE_DEPS)
list(APPEND update_dep_command "${CMAKE_GENERATOR}")
if (CMAKE_GENERATOR_PLATFORM)
- set(_target_arch ${CMAKE_GENERATOR_PLATFORM})
- else()
- if (MSVC_IDE)
- message(WARNING "CMAKE_GENERATOR_PLATFORM not set. Using x64 as target architecture.")
- endif()
- set(_target_arch x64)
+ list(APPEND update_dep_command "--arch")
+ list(APPEND update_dep_command "${CMAKE_GENERATOR_PLATFORM}")
endif()
- list(APPEND update_dep_command "--arch")
- list(APPEND update_dep_command "${_target_arch}")
if (NOT CMAKE_BUILD_TYPE)
message(WARNING "CMAKE_BUILD_TYPE not set. Using Debug for dependency build type")
@@ -88,12 +82,16 @@ if (UPDATE_DEPS)
set(UPDATE_DEPS_HASH "0" CACHE STRING "Default value until we run update_deps.py")
mark_as_advanced(UPDATE_DEPS_HASH)
+ if ("${UPDATE_DEPS_HASH}" STREQUAL "0")
+ list(APPEND update_dep_command "--clean-build")
+ list(APPEND update_dep_command "--clean-install")
+ endif()
+
if ("${md5_hash}" STREQUAL $CACHE{UPDATE_DEPS_HASH})
message(DEBUG "update_deps.py: no work to do.")
else()
execute_process(
COMMAND ${Python3_EXECUTABLE} ${update_dep_command}
- WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
RESULT_VARIABLE _update_deps_result
)
if (NOT (${_update_deps_result} EQUAL 0))