mirror of https://github.com/stenzek/duckstation
CMake: Tidy up build system
And fix Windows CMake... who knows how long for.pull/3187/head
parent
a88ee93b4d
commit
8867bb129a
@ -0,0 +1,15 @@
|
||||
# Renderer options.
|
||||
option(ENABLE_OPENGL "Build with OpenGL renderer" ON)
|
||||
option(ENABLE_VULKAN "Build with Vulkan renderer" ON)
|
||||
option(BUILD_NOGUI_FRONTEND "Build the NoGUI frontend" OFF)
|
||||
option(BUILD_QT_FRONTEND "Build the Qt frontend" ON)
|
||||
option(BUILD_REGTEST "Build regression test runner" OFF)
|
||||
option(BUILD_TESTS "Build unit tests" OFF)
|
||||
|
||||
if(LINUX OR BSD)
|
||||
option(ENABLE_X11 "Support X11 window system" ON)
|
||||
option(ENABLE_WAYLAND "Support Wayland window system" ON)
|
||||
endif()
|
||||
if(APPLE)
|
||||
option(SKIP_POSTPROCESS_BUNDLE "Disable bundle post-processing, including Qt additions" OFF)
|
||||
endif()
|
||||
@ -0,0 +1,45 @@
|
||||
if(ENABLE_OPENGL)
|
||||
message(STATUS "Building with OpenGL support.")
|
||||
endif()
|
||||
if(ENABLE_VULKAN)
|
||||
message(STATUS "Building with Vulkan support.")
|
||||
endif()
|
||||
if(ENABLE_X11)
|
||||
message(STATUS "Building with X11 support.")
|
||||
endif()
|
||||
if(ENABLE_WAYLAND)
|
||||
message(STATUS "Building with Wayland support.")
|
||||
endif()
|
||||
|
||||
if(BUILD_QT_FRONTEND)
|
||||
message(STATUS "Building Qt frontend.")
|
||||
endif()
|
||||
if(BUILD_NOGUI_FRONTEND)
|
||||
message(STATUS "Building NoGUI frontend.")
|
||||
endif()
|
||||
if(BUILD_REGTEST)
|
||||
message(STATUS "Building RegTest frontend.")
|
||||
endif()
|
||||
if(BUILD_TESTS)
|
||||
message(STATUS "Building unit tests.")
|
||||
endif()
|
||||
|
||||
if(NOT IS_SUPPORTED_COMPILER)
|
||||
message(WARNING "
|
||||
*************** UNSUPPORTED CONFIGURATION ***************
|
||||
You are not compiling DuckStation with a supported compiler.
|
||||
It may not even build successfully.
|
||||
DuckStation only supports the Clang and MSVC compilers.
|
||||
No support will be provided, continue at your own risk.
|
||||
*********************************************************")
|
||||
endif()
|
||||
|
||||
if(WIN32)
|
||||
message(WARNING "
|
||||
*************** UNSUPPORTED CONFIGURATION ***************
|
||||
You are compiling DuckStation with CMake on Windows.
|
||||
It may not even build successfully.
|
||||
DuckStation only supports MSBuild on Windows.
|
||||
No support will be provided, continue at your own risk.
|
||||
*********************************************************")
|
||||
endif()
|
||||
@ -1,13 +1,15 @@
|
||||
add_library(WinPixEventRuntime::WinPixEventRuntime UNKNOWN IMPORTED GLOBAL)
|
||||
add_library(WinPixEventRuntime::WinPixEventRuntime SHARED IMPORTED GLOBAL)
|
||||
|
||||
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "arm64")
|
||||
set_target_properties(WinPixEventRuntime::WinPixEventRuntime PROPERTIES
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/libarm64/WinPixEventRuntime.lib"
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/binarm64/WinPixEventRuntime.dll"
|
||||
IMPORTED_IMPLIB "${CMAKE_CURRENT_SOURCE_DIR}/libarm64/WinPixEventRuntime.lib"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include"
|
||||
)
|
||||
else()
|
||||
set_target_properties(WinPixEventRuntime::WinPixEventRuntime PROPERTIES
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/lib64/WinPixEventRuntime.lib"
|
||||
IMPORTED_LOCATION "${CMAKE_CURRENT_SOURCE_DIR}/bin64/WinPixEventRuntime.dll"
|
||||
IMPORTED_IMPLIB "${CMAKE_CURRENT_SOURCE_DIR}/lib64/WinPixEventRuntime.lib"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${CMAKE_CURRENT_SOURCE_DIR}/include"
|
||||
)
|
||||
endif()
|
||||
|
||||
Loading…
Reference in New Issue