init
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Close stale issues and PRs / stale (push) Successful in 13s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
Some checks failed
Docker. / Ubuntu (push) Has been cancelled
User-agent updater. / User-agent (push) Failing after 15s
Lock Threads / lock (push) Failing after 10s
Waiting for answer. / waiting-for-answer (push) Failing after 22s
Close stale issues and PRs / stale (push) Successful in 13s
Needs user action. / needs-user-action (push) Failing after 8s
Can't reproduce. / cant-reproduce (push) Failing after 8s
This commit is contained in:
52
cmake/validate_special_target.cmake
Normal file
52
cmake/validate_special_target.cmake
Normal file
@@ -0,0 +1,52 @@
|
||||
# This file is part of Desktop App Toolkit,
|
||||
# a set of libraries for developing nice desktop applications.
|
||||
#
|
||||
# For license and copyright information please follow this link:
|
||||
# https://github.com/desktop-app/legal/blob/master/LEGAL
|
||||
|
||||
include(CMakeDependentOption)
|
||||
|
||||
set(DESKTOP_APP_SPECIAL_TARGET "" CACHE STRING "Use special platform target, like 'macstore' for Mac App Store.")
|
||||
|
||||
get_filename_component(libs_loc "../Libraries" REALPATH)
|
||||
set(libs_loc_exists 0)
|
||||
if (EXISTS ${libs_loc})
|
||||
set(libs_loc_exists 1)
|
||||
endif()
|
||||
cmake_dependent_option(DESKTOP_APP_USE_PACKAGED "Find libraries using CMake instead of exact paths." OFF libs_loc_exists ON)
|
||||
|
||||
function(report_bad_special_target)
|
||||
if (NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "")
|
||||
message(FATAL_ERROR "Bad special target '${DESKTOP_APP_SPECIAL_TARGET}'")
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
if (APPLE AND NOT DESKTOP_APP_USE_PACKAGED)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET 10.13 CACHE STRING "Minimum macOS deployment version")
|
||||
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "Target macOS architectures")
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED MSVC)
|
||||
set(MSVC 0)
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
if (NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp"
|
||||
AND NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwp64"
|
||||
AND NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "win"
|
||||
AND NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "win64"
|
||||
AND NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "winarm"
|
||||
AND NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "uwparm")
|
||||
report_bad_special_target()
|
||||
endif()
|
||||
elseif (APPLE)
|
||||
if (NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "macstore"
|
||||
AND NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "mac")
|
||||
report_bad_special_target()
|
||||
endif()
|
||||
else()
|
||||
set(LINUX 1)
|
||||
if (NOT DESKTOP_APP_SPECIAL_TARGET STREQUAL "linux")
|
||||
report_bad_special_target()
|
||||
endif()
|
||||
endif()
|
||||
Reference in New Issue
Block a user