mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 11:07:10 +01:00
[vcpkg] Allow compilation via CMake with MSVC (#2935)
This commit is contained in:
parent
bad51b0462
commit
1bcf4cef0d
@ -1,16 +1,20 @@
|
||||
cmake_minimum_required(VERSION 3.3)
|
||||
project(vcpkg CXX)
|
||||
|
||||
add_compile_options(-std=c++1z)
|
||||
|
||||
if(CMAKE_COMPILER_IS_GNUXX OR CMAKE_CXX_COMPILER_ID MATCHES "GNU")
|
||||
set(GCC 1)
|
||||
elseif(CMAKE_CXX_COMPILER_ID MATCHES "[Cc]lang")
|
||||
set(CLANG 1)
|
||||
elseif(MSVC)
|
||||
add_compile_options(/std:c++latest)
|
||||
else()
|
||||
message(FATAL_ERROR "Unknown compiler: ${CMAKE_CXX_COMPILER_ID}")
|
||||
endif()
|
||||
|
||||
if(GCC OR CLANG)
|
||||
add_compile_options(-std=c++1z)
|
||||
endif()
|
||||
|
||||
file(GLOB_RECURSE VCPKGLIB_SOURCES src/vcpkg/*.cpp)
|
||||
|
||||
add_executable(vcpkg src/vcpkg.cpp ${VCPKGLIB_SOURCES})
|
||||
|
Loading…
x
Reference in New Issue
Block a user