GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — 86Box/CMakeLists.txt at master · 86Box/86Box Expand file tree/ Copy pathCMakeLists.txtMore file actions 303 lines (259 loc) · 11.8 KB / Copy pathCMakeLists.txtFile metadata and controls303 lines (259 loc) · 11.8 KB 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 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 # # 86Box A hypervisor and IBM PC system emulator that specializes in # running old operating systems and software designed for IBM # PC systems and compatibles from 1981 through fairly recent # system designs based on the PCI bus. # # This file is part of the 86Box distribution. # # CMake build script. # # Authors: David Hrdlička, <[email protected]> # # Copyright 2020-2021 David Hrdlička. # Copyright 2021-2026 Jasmine Iwanek. # cmake_minimum_required(VERSION 3.16) cmake_policy(SET CMP0091 NEW) cmake_policy(SET CMP0079 NEW) list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake") set(CMAKE_C_STANDARD 11) set(CMAKE_CXX_STANDARD 17) set(CMAKE_FIND_PACKAGE_PREFER_CONFIG ON) set(CMAKE_CONFIGURATION_TYPES "Debug;Release;UltraDebug;Optimized" CACHE STRING "") if(NOT DEFINED QT OR QT) list(APPEND VCPKG_MANIFEST_FEATURES "qt-ui") endif() if(NOT DEFINED OPENAL OR OPENAL) list(APPEND VCPKG_MANIFEST_FEATURES "openal") endif() if(MUNT_EXTERNAL) list(APPEND VCPKG_MANIFEST_FEATURES "munt") endif() project(86Box VERSION 7.0 DESCRIPTION "Emulator of x86-based systems" HOMEPAGE_URL "https://86box.net" LANGUAGES C CXX) if (NOT (CMAKE_SIZEOF_VOID_P STREQUAL "8")) message(FATAL_ERROR "Only 64-bit builds are supported.") endif() if (CMAKE_C_BYTE_ORDER STREQUAL "BIG_ENDIAN") message(FATAL_ERROR "Big-endian builds are not supported.") endif() # Make the build directory ignore itself in git, regardless of its name if(NOT CMAKE_BINARY_DIR STREQUAL CMAKE_SOURCE_DIR AND NOT EXISTS "${CMAKE_BINARY_DIR}/.gitignore") file(WRITE "${CMAKE_BINARY_DIR}/.gitignore" "*\n") endif() include(CPack) include(CMakeDependentOption) include(FetchContent) # Basic build options if(VCPKG_TOOLCHAIN) # For vcpkg builds we have to respect the linking method used by the # specified triplet. set(NO_STATIC_OPTION ON) if(VCPKG_TARGET_TRIPLET MATCHES "-static$") # `-static` triplet, use static linking set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") set(STATIC_BUILD ON) elseif(VCPKG_TARGET_TRIPLET MATCHES "-static-md$") # `-static-md` triplet, use static linking with dynamic CRT set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL") set(STATIC_BUILD ON) else() # Regular triplet, use dynamic linking set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>DLL") set(STATIC_BUILD OFF) endif() # `vcpkg.json` defaults to Qt6 set(USE_QT6 ON) endif() if(WIN32) # Prefer static builds on Windows set(PREFER_STATIC ON) # Default value for the `WIN32` target property, which specifies whether # to build the application for the Windows GUI or console subsystem option(CMAKE_WIN32_EXECUTABLE "Build a Windows GUI executable" ON) else() # Prefer dynamic builds everywhere else set(PREFER_STATIC OFF) endif() if(APPLE) option(CMAKE_MACOSX_BUNDLE "Build a macOS bundle (.app)" ON) endif() if(NOT NO_STATIC_OPTION) if(PREFER_STATIC) option(STATIC_BUILD "Static build" ON) else() option(STATIC_BUILD "Static build" OFF) endif() endif() if(HAIKU) set(OPENAL ON) endif() include(DetectTargetArch) include(CompilerFlags) # Optional features # # Option Description Def. # ------ ----------- ---- option(RELEASE "Release build" OFF) option(DYNAREC "Dynamic recompiler" ON) option(OPENAL "OpenAL" ON) option(RTMIDI "RtMidi" ON) option(FLUIDSYNTH "FluidSynth" ON) option(MUNT "MUNT" ON) option(SOUNDCANVAS "Sound Canvas (CLAP)" ON) option(VNC "VNC renderer" OFF) option(MINITRACE "Enable Chrome tracing using the modified minitrace library" OFF) option(GDBSTUB "Enable GDB stub server for debugging" OFF) option(AUTOMATION "Enable the automation control socket" OFF) option(DISASM "Disassembler in the memory viewer (Zydis)" ON) option(DEV_BRANCH "Development branch" OFF) option(DISCORD "Discord Rich Presence support" ON) option(ENABLE_MODEM_LOG "Enable modem logging" OFF) option(ENABLE_MODEM_DEBUG "Enable detailed modem logging (requires ENABLE_MODEM_LOG)" OFF) option(ENABLE_MODEM_ADVANCED_CONFIG "Show advanced modem configuration options" OFF) option(ENABLE_MODEM_IPV6 "Enable IPv6 over the emulated modem (incomplete)" OFF) option(ENABLE_VSERVER_WINS "Enable WINS in the virtual network server" OFF) option(ENABLE_VSERVER_SMB "Enable SMB in the virtual network server (implies ENABLE_VSERVER_WINS)" OFF) option(ENABLE_VSERVER_NETBEUI "Enable NetBEUI access to the virtual server over PPP and Ethernet (implies ENABLE_VSERVER_SMB)" OFF) option(ENABLE_VSERVER_IPX "Enable IPX access to the virtual server over PPP and Ethernet (implies ENABLE_VSERVER_SMB)" OFF) option(ENABLE_VSERVER_PPTP "Enable the virtual server's PPTP VPN endpoint (implies ENABLE_VSERVER_SMB)" OFF) option(ENABLE_VSERVER_FTP "Enable the read-only FTP server in the virtual network server" OFF) option(ENABLE_VSERVER_TFTP "Enable the read-only TFTP server in the virtual network server" OFF) option(ENABLE_VSERVER_RARP "Enable RARP replies for the SLiRP guest network adapter" OFF) option(ENABLE_VSERVER_BOOTP "Enable legacy BOOTP client compatibility in SLiRP DHCP" OFF) option(ENABLE_MODEM_RAW_CAPTURE "Log raw modem serial traffic and probe state (requires ENABLE_MODEM_LOG)" OFF) if(ENABLE_MODEM_DEBUG AND NOT ENABLE_MODEM_LOG) message(FATAL_ERROR "ENABLE_MODEM_DEBUG requires ENABLE_MODEM_LOG") endif() if(ENABLE_MODEM_RAW_CAPTURE AND NOT ENABLE_MODEM_LOG) message(FATAL_ERROR "ENABLE_MODEM_RAW_CAPTURE requires ENABLE_MODEM_LOG") endif() option(LIBASAN "Enable compilation with the addresss sanitizer" OFF) option(QT "Use the Qt-based user interface" ON) option(SDL2 "Use SDL2 instead of SDL3" OFF) option(BUILD_TESTING "Build the unit test suite" OFF) option(BUILD_BENCHMARKS "Build performance benchmarks" OFF) if(BUILD_TESTING) enable_testing() find_package(GTest CONFIG REQUIRED) endif() if(BUILD_BENCHMARKS) find_package(benchmark CONFIG REQUIRED) endif() if(BUILD_TESTING OR BUILD_BENCHMARKS) add_subdirectory(tests) endif() if(CMAKE_SYSTEM_NAME STREQUAL "NetBSD") option(AUDIO4 "Use audio(4) as sound backend" ON) else() set(AUDIO4 OFF) endif() if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") option(SNDIO "Use sndio as sound backend" ON) else() set(SNDIO OFF) endif() if(WIN32) option(CPPTHREADS "C++11 threads" OFF) else() option(CPPTHREADS "C++11 threads" ON) endif() if(WIN32 AND NOT QT) # Force console subsystem when building the SDL frontend set(CMAKE_WIN32_EXECUTABLE OFF CACHE BOOL "Build a Windows GUI executable" FORCE) endif() if(WIN32 AND GDBSTUB) # Force console subsystem when building with GDBSTUB set(CMAKE_WIN32_EXECUTABLE OFF CACHE BOOL "Build a Windows GUI executable" FORCE) endif() if(WIN32 AND NOT CMAKE_WIN32_EXECUTABLE) add_compile_definitions(WIN_CONSOLE_LOG=1) endif() if(GDBSTUB) set(DYNAREC OFF CACHE BOOL "Dynamic Recompiler" FORCE) endif() if(CMAKE_SYSTEM_NAME STREQUAL "OpenBSD") SET(CMAKE_EXE_LINKER_FLAGS "-Wl,-z,wxneeded") endif() # Development branch features # # Option Description Def. Condition Otherwise # ------ ----------- ---- ------------ --------- cmake_dependent_option(AMD_K5 "AMD K5" ON "DEV_BRANCH" OFF) cmake_dependent_option(G100 "Matrox Productiva G100" ON "DEV_BRANCH" OFF) cmake_dependent_option(ISAMEM_RAMPAGE "AST Rampage" ON "DEV_BRANCH" OFF) cmake_dependent_option(ISAMEM_IAB "Intel Above Board" ON "DEV_BRANCH" OFF) cmake_dependent_option(ISAMEM_BRAT "BocaRAM/AT" ON "DEV_BRANCH" OFF) cmake_dependent_option(OPL4ML "OPL4-ML daughterboard" ON "DEV_BRANCH" OFF) cmake_dependent_option(SIO_DETECT "Super I/O Detection Helper" ON "DEV_BRANCH" OFF) cmake_dependent_option(WACOM "Wacom Input Devices" ON "DEV_BRANCH" OFF) cmake_dependent_option(VFIO "Virtual Function I/O" ON "DEV_BRANCH" OFF) cmake_dependent_option(SOFTMODEM "AC'97 Softmodem" ON "DEV_BRANCH" OFF) # Defaults to DEV_BRANCH like the options above, but can also be enabled on its own option(RAGE128_MAXX "ATI Rage Fury MAXX" ${DEV_BRANCH}) option(POWERVR_PCX_DEV "PowerVR PCX: developer/test settings in the device" OFF) # Ditto but for Qt if(QT) option(USE_QT6 "Use Qt6 instead of Qt5" OFF) if(APPLE) option(MOLTENVK "Use MoltenVK libraries for Vulkan support on macOS. Requires a Vulkan-enabled QT." OFF) endif() option(LIBRASHADER "Build with librashader support" ON) if(LIBRASHADER) option(LIBRASHADER_STATIC "Statically link with librashader" OFF) if(LIBRASHADER_STATIC) option(LIBRASHADER_STATIC_FIND_LIB "Find static librashader library instead of building." OFF) if (NOT LIBRASHADER_STATIC_FIND_LIB) set(FETCHCONTENT_QUIET 0) FetchContent_Declare(librashader GIT_REPOSITORY https://github.com/SnowflakePowered/librashader.git GIT_TAG f810cdf6e856e5a5215b1e84a21c978bc3367f23 GIT_SUBMODULES "" GIT_PROGRESS 1) FetchContent_Declare(corrosion GIT_REPOSITORY https://github.com/corrosion-rs/corrosion.git GIT_TAG c4786e7ae2d5ade784aca29448df362c874ed04e) FetchContent_MakeAvailable(librashader corrosion) FetchContent_GetProperties(librashader SOURCE_DIR LIBRASHADER_SOURCE_DIR) corrosion_import_crate(MANIFEST_PATH ${LIBRASHADER_SOURCE_DIR}/librashader-capi/Cargo.toml NO_DEFAULT_FEATURES FEATURES runtime-vulkan CRATE_TYPES staticlib) endif() endif() endif() endif() # Determine the build type set(RELEASE_BUILD OFF) set(BETA_BUILD OFF) set(ALPHA_BUILD OFF) string(TOLOWER "${BUILD_TYPE}" BUILD_TYPE_LOWER) if(BUILD_TYPE_LOWER STREQUAL "release") # Release build set(RELEASE_BUILD ON) add_compile_definitions(RELEASE_BUILD) elseif(BUILD_TYPE_LOWER STREQUAL "beta") # Beta build set(BETA_BUILD ON) add_compile_definitions(BETA_BUILD) elseif(BUILD_TYPE_LOWER STREQUAL "alpha") # Alpha build set(ALPHA_BUILD ON) add_compile_definitions(ALPHA_BUILD) endif() # Versioning variables if(NOT CMAKE_PROJECT_VERSION_PATCH) set(CMAKE_PROJECT_VERSION_PATCH 0) endif() if(NOT EMU_BUILD_NUM) set(EMU_BUILD_NUM 0) endif() if(NOT EMU_COPYRIGHT_YEAR) set(EMU_COPYRIGHT_YEAR 2026) endif() # Libasan if(LIBASAN) add_compile_options(-fsanitize=address) add_link_options(-fsanitize=address) endif() set(CMAKE_TOP_LEVEL_PROCESSED TRUE) add_subdirectory(src) |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |