-
Notifications
You must be signed in to change notification settings - Fork 2
/
configure.cmake
39 lines (35 loc) · 1.45 KB
/
configure.cmake
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
if("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows")
execute_process(COMMAND "${CMAKE_COMMAND}"
-G "Visual Studio 17 2022"
-A "X64"
-S "$ENV{GITHUB_WORKSPACE}"
-B "$ENV{GITHUB_WORKSPACE}/cmake-build"
-DTARGET_TRIPLET=x64-windows
-DCMAKE_VERBOSE_MAKEFILE=YES
"-DCMAKE_INSTALL_PREFIX=$ENV{GITHUB_WORKSPACE}/cmake-install"
"-DCMAKE_TOOLCHAIN_FILE=$ENV{VCPKG_INSTALLATION_ROOT}/scripts/buildsystems/vcpkg.cmake"
RESULT_VARIABLE result
)
elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Linux")
execute_process(COMMAND "${CMAKE_COMMAND}"
-G "Unix Makefiles"
-S "$ENV{GITHUB_WORKSPACE}"
-B "$ENV{GITHUB_WORKSPACE}/cmake-build"
-DCMAKE_VERBOSE_MAKEFILE=YES
-DCMAKE_BUILD_TYPE=$ENV{BUILD_TYPE}
"-DCMAKE_INSTALL_PREFIX=$ENV{GITHUB_WORKSPACE}/cmake-install"
RESULT_VARIABLE result
)
elseif("${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Darwin")
execute_process(COMMAND "${CMAKE_COMMAND}"
-G "Unix Makefiles"
-S "$ENV{GITHUB_WORKSPACE}"
-B "$ENV{GITHUB_WORKSPACE}/cmake-build"
-DCMAKE_VERBOSE_MAKEFILE=YES
"-DCMAKE_INSTALL_PREFIX=$ENV{GITHUB_WORKSPACE}/cmake-install"
RESULT_VARIABLE result
)
endif()
if(NOT result EQUAL 0)
message(FATAL_ERROR "CMake returned bad exit status")
endif()