2020-04-08 13:06:35 -07:00
|
|
|
cmake_minimum_required(VERSION 3.14)
|
2024-01-06 23:08:22 +00:00
|
|
|
project(FEX C CXX ASM)
|
2019-07-13 02:41:34 -07:00
|
|
|
|
2022-06-17 21:09:54 +03:00
|
|
|
INCLUDE (CheckIncludeFiles)
|
|
|
|
CHECK_INCLUDE_FILES ("gdb/jit-reader.h" HAVE_GDB_JIT_READER_H)
|
|
|
|
|
2019-07-13 02:41:34 -07:00
|
|
|
option(BUILD_TESTS "Build unit tests to ensure sanity" TRUE)
|
2022-06-24 17:30:49 +02:00
|
|
|
option(BUILD_FEX_LINUX_TESTS "Build FEXLinuxTests, requires x86 compiler" FALSE)
|
2021-01-31 00:28:15 +13:00
|
|
|
option(BUILD_THUNKS "Build thunks" FALSE)
|
2024-08-27 18:06:14 +02:00
|
|
|
set(USE_FEXCONFIG_TOOLKIT "imgui" CACHE STRING "If set, build FEXConfig (qt or imgui)")
|
2022-11-21 21:11:01 -08:00
|
|
|
option(ENABLE_CLANG_THUNKS "Build thunks with clang" FALSE)
|
2020-10-13 17:38:40 -07:00
|
|
|
option(ENABLE_IWYU "Enables include what you use program" FALSE)
|
2019-07-13 02:41:34 -07:00
|
|
|
option(ENABLE_LTO "Enable LTO with compilation" TRUE)
|
|
|
|
option(ENABLE_XRAY "Enable building with LLVM X-Ray" FALSE)
|
2023-08-03 13:58:20 -07:00
|
|
|
set(USE_LINKER "" CACHE STRING "Allow overriding the linker path directly")
|
2019-07-13 02:41:34 -07:00
|
|
|
option(ENABLE_ASAN "Enables Clang ASAN" FALSE)
|
|
|
|
option(ENABLE_TSAN "Enables Clang TSAN" FALSE)
|
2024-07-01 15:02:16 +02:00
|
|
|
option(ENABLE_COVERAGE "Enables Coverage" FALSE)
|
2020-08-29 23:31:38 -07:00
|
|
|
option(ENABLE_ASSERTIONS "Enables assertions in build" FALSE)
|
2022-06-17 21:09:54 +03:00
|
|
|
option(ENABLE_GDB_SYMBOLS "Enables GDBSymbols integration support" ${HAVE_GDB_JIT_READER_H})
|
2021-03-12 19:16:38 -08:00
|
|
|
option(ENABLE_STRICT_WERROR "Enables stricter -Werror for CI" FALSE)
|
|
|
|
option(ENABLE_WERROR "Enables -Werror" FALSE)
|
2021-07-22 18:16:24 -07:00
|
|
|
option(ENABLE_JEMALLOC "Enables jemalloc allocator" TRUE)
|
2023-04-10 17:07:08 -07:00
|
|
|
option(ENABLE_JEMALLOC_GLIBC_ALLOC "Enables jemalloc glibc allocator" TRUE)
|
2021-08-06 22:40:19 -07:00
|
|
|
option(ENABLE_OFFLINE_TELEMETRY "Enables FEX offline telemetry" TRUE)
|
2021-11-26 14:41:26 -08:00
|
|
|
option(ENABLE_COMPILE_TIME_TRACE "Enables time trace compile option" FALSE)
|
2021-12-24 15:46:58 -08:00
|
|
|
option(ENABLE_LIBCXX "Enables LLVM libc++" FALSE)
|
2022-02-16 19:24:24 -08:00
|
|
|
option(ENABLE_CCACHE "Enables ccache for compile caching" TRUE)
|
2022-09-07 19:12:46 -07:00
|
|
|
option(ENABLE_VIXL_SIMULATOR "Forces the FEX JIT to use the VIXL simulator" FALSE)
|
2022-12-18 14:56:40 -08:00
|
|
|
option(ENABLE_VIXL_DISASSEMBLER "Enables debug disassembler output with VIXL" FALSE)
|
2024-08-16 18:34:45 -07:00
|
|
|
option(USE_LEGACY_BINFMTMISC "Uses legacy method of setting up binfmt_misc" FALSE)
|
2023-01-12 13:55:00 -08:00
|
|
|
option(COMPILE_VIXL_DISASSEMBLER "Compiles the vixl disassembler in to vixl" FALSE)
|
2022-10-13 18:16:06 -07:00
|
|
|
option(ENABLE_FEXCORE_PROFILER "Enables use of the FEXCore timeline profiling capabilities" FALSE)
|
|
|
|
set (FEXCORE_PROFILER_BACKEND "gpuvis" CACHE STRING "Set which backend you want to use for the FEXCore profiler")
|
2023-03-17 20:02:10 -07:00
|
|
|
option(ENABLE_GLIBC_ALLOCATOR_HOOK_FAULT "Enables glibc memory allocation hooking with fault for CI testing")
|
2024-07-19 19:09:59 +00:00
|
|
|
option(USE_PDB_DEBUGINFO "Builds debug info in PDB format" FALSE)
|
2019-07-13 02:41:34 -07:00
|
|
|
|
2022-09-19 09:19:22 +02:00
|
|
|
set (X86_32_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/toolchain_x86_32.cmake" CACHE FILEPATH "Toolchain file for the (cross-)compiler targeting i686")
|
|
|
|
set (X86_64_TOOLCHAIN_FILE "${CMAKE_CURRENT_SOURCE_DIR}/toolchain_x86_64.cmake" CACHE FILEPATH "Toolchain file for the (cross-)compiler targeting x86_64")
|
2020-12-05 21:17:07 -08:00
|
|
|
set (DATA_DIRECTORY "${CMAKE_INSTALL_PREFIX}/share/fex-emu" CACHE PATH "global data directory")
|
2021-12-30 22:55:46 -08:00
|
|
|
|
2023-03-12 16:37:35 -07:00
|
|
|
string(FIND ${CMAKE_BASE_NAME} mingw CONTAINS_MINGW)
|
|
|
|
if (NOT CONTAINS_MINGW EQUAL -1)
|
|
|
|
message (STATUS "Mingw build")
|
|
|
|
set (MINGW_BUILD TRUE)
|
2024-07-29 12:31:04 +00:00
|
|
|
set (ENABLE_JEMALLOC TRUE)
|
2024-06-26 15:53:49 +01:00
|
|
|
set (ENABLE_JEMALLOC_GLIBC_ALLOC FALSE)
|
2023-03-12 16:37:35 -07:00
|
|
|
endif()
|
|
|
|
|
2024-06-15 18:41:19 -07:00
|
|
|
if (NOT MINGW_BUILD)
|
|
|
|
message (STATUS "Clang version ${CMAKE_CXX_COMPILER_VERSION}")
|
|
|
|
set (CLANG_MINIMUM_VERSION 12.0)
|
|
|
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS ${CLANG_MINIMUM_VERSION})
|
|
|
|
message (FATAL_ERROR "Clang version too old for FEX. Need at least ${CLANG_MINIMUM_VERSION} but has ${CMAKE_CXX_COMPILER_VERSION}")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2022-10-13 18:16:06 -07:00
|
|
|
if (ENABLE_FEXCORE_PROFILER)
|
|
|
|
add_definitions(-DENABLE_FEXCORE_PROFILER=1)
|
|
|
|
string(TOUPPER "${FEXCORE_PROFILER_BACKEND}" FEXCORE_PROFILER_BACKEND)
|
|
|
|
|
|
|
|
if (FEXCORE_PROFILER_BACKEND STREQUAL "GPUVIS")
|
|
|
|
add_definitions(-DFEXCORE_PROFILER_BACKEND=1)
|
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Unknown FEXCore profiler backend ${FEXCORE_PROFILER_BACKEND}")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2023-04-10 17:07:08 -07:00
|
|
|
if (ENABLE_JEMALLOC_GLIBC_ALLOC AND ENABLE_GLIBC_ALLOCATOR_HOOK_FAULT)
|
|
|
|
message(FATAL_ERROR "Can't have both glibc fault allocator and jemalloc glibc allocator enabled at the same time")
|
|
|
|
endif()
|
|
|
|
|
2023-03-17 20:02:10 -07:00
|
|
|
if (ENABLE_GLIBC_ALLOCATOR_HOOK_FAULT)
|
|
|
|
add_definitions(-DGLIBC_ALLOCATOR_FAULT=1)
|
|
|
|
endif()
|
|
|
|
|
2022-09-14 18:16:16 -07:00
|
|
|
# uninstall target
|
|
|
|
if(NOT TARGET uninstall)
|
|
|
|
configure_file(
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/CMakeFiles/cmake_uninstall.cmake.in"
|
|
|
|
"${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/cmake_uninstall.cmake"
|
|
|
|
IMMEDIATE @ONLY)
|
|
|
|
|
|
|
|
add_custom_target(uninstall
|
|
|
|
COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/cmake_uninstall.cmake)
|
|
|
|
endif()
|
|
|
|
|
2021-12-30 22:55:46 -08:00
|
|
|
# These options are meant for package management
|
2021-12-29 17:14:40 -08:00
|
|
|
set (TUNE_CPU "native" CACHE STRING "Override the CPU the build is tuned for")
|
2022-01-05 13:48:35 -08:00
|
|
|
set (TUNE_ARCH "generic" CACHE STRING "Override the Arch the build is tuned for")
|
2021-12-30 22:55:46 -08:00
|
|
|
set (OVERRIDE_VERSION "detect" CACHE STRING "Override the FEX version in the format of <MMYY>{.<REV>}")
|
2020-08-21 00:38:25 +12:00
|
|
|
|
2020-08-29 23:31:38 -07:00
|
|
|
string(TOUPPER "${CMAKE_BUILD_TYPE}" CMAKE_BUILD_TYPE)
|
|
|
|
if (CMAKE_BUILD_TYPE MATCHES "DEBUG")
|
|
|
|
set(ENABLE_ASSERTIONS TRUE)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (ENABLE_ASSERTIONS)
|
|
|
|
message(STATUS "Assertions enabled")
|
|
|
|
add_definitions(-DASSERTIONS_ENABLED=1)
|
|
|
|
endif()
|
|
|
|
|
2022-06-17 21:09:54 +03:00
|
|
|
if (ENABLE_GDB_SYMBOLS)
|
|
|
|
message(STATUS "GDBSymbols support enabled")
|
|
|
|
add_definitions(-DGDB_SYMBOLS_ENABLED=1)
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2020-10-13 17:51:28 -07:00
|
|
|
set(CMAKE_CXX_STANDARD 20)
|
2019-07-13 02:41:34 -07:00
|
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
|
|
|
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/Bin)
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
2020-03-12 16:26:13 -07:00
|
|
|
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
2020-04-08 13:06:35 -07:00
|
|
|
cmake_policy(SET CMP0083 NEW) # Follow new PIE policy
|
|
|
|
include(CheckPIESupported)
|
|
|
|
check_pie_supported()
|
2019-07-13 02:41:34 -07:00
|
|
|
|
|
|
|
if (ENABLE_LTO)
|
|
|
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
2020-02-18 15:48:53 -08:00
|
|
|
else()
|
|
|
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION FALSE)
|
2019-07-13 02:41:34 -07:00
|
|
|
endif()
|
|
|
|
|
2021-08-02 17:04:39 -07:00
|
|
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "x86_64")
|
2024-06-23 08:21:14 -07:00
|
|
|
option(ENABLE_X86_HOST_DEBUG "Enables compiling on x86_64 host" FALSE)
|
|
|
|
if (NOT ENABLE_X86_HOST_DEBUG)
|
|
|
|
message(FATAL_ERROR
|
|
|
|
" FEX-Emu doesn't support compiling for x86-64 hosts!"
|
|
|
|
" This is /only/ a supported configuration for FEX CI and nothing else!")
|
|
|
|
endif()
|
2021-08-02 17:04:39 -07:00
|
|
|
set(_M_X86_64 1)
|
|
|
|
add_definitions(-D_M_X86_64=1)
|
|
|
|
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -mcx16")
|
|
|
|
endif()
|
|
|
|
|
2022-09-08 15:17:40 -07:00
|
|
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^aarch64|^arm64|^armv8\.*")
|
2021-08-02 17:04:39 -07:00
|
|
|
set(_M_ARM_64 1)
|
|
|
|
add_definitions(-D_M_ARM_64=1)
|
|
|
|
endif()
|
|
|
|
|
2024-01-24 00:28:44 +00:00
|
|
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "^arm64ec")
|
|
|
|
set(_M_ARM_64EC 1)
|
|
|
|
add_definitions(-D_M_ARM_64EC=1)
|
|
|
|
endif()
|
|
|
|
|
2024-08-03 18:24:50 -07:00
|
|
|
include(CheckCXXSourceCompiles)
|
|
|
|
set(CMAKE_REQUIRED_FLAGS "-std=c++11 -Wattributes -Werror=attributes")
|
|
|
|
check_cxx_source_compiles(
|
|
|
|
"
|
|
|
|
__attribute__((preserve_all))
|
|
|
|
int Testy(int a, int b, int c, int d, int e, int f) {
|
|
|
|
return a + b + c + d + e + f;
|
|
|
|
}
|
|
|
|
int main() {
|
|
|
|
return Testy(0, 1, 2, 3, 4, 5);
|
|
|
|
}"
|
|
|
|
HAS_CLANG_PRESERVE_ALL)
|
|
|
|
unset(CMAKE_REQUIRED_FLAGS)
|
|
|
|
if (HAS_CLANG_PRESERVE_ALL)
|
|
|
|
if (MINGW_BUILD)
|
|
|
|
message(STATUS "Ignoring broken clang::preserve_all support")
|
|
|
|
set(HAS_CLANG_PRESERVE_ALL FALSE)
|
|
|
|
else()
|
|
|
|
message(STATUS "Has clang::preserve_all")
|
|
|
|
endif()
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (_M_ARM_64 AND HAS_CLANG_PRESERVE_ALL)
|
|
|
|
add_definitions("-DFEX_PRESERVE_ALL_ATTR=__attribute__((preserve_all))" "-DFEX_HAS_PRESERVE_ALL_ATTR=1")
|
|
|
|
else()
|
|
|
|
add_definitions("-DFEX_PRESERVE_ALL_ATTR=" "-DFEX_HAS_PRESERVE_ALL_ATTR=0")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (ENABLE_VIXL_SIMULATOR)
|
|
|
|
# We can run the simulator on both x86-64 or AArch64 hosts
|
|
|
|
add_definitions(-DVIXL_SIMULATOR=1 -DVIXL_INCLUDE_SIMULATOR_AARCH64=1)
|
|
|
|
endif()
|
|
|
|
|
2022-02-16 19:24:24 -08:00
|
|
|
if (ENABLE_CCACHE)
|
|
|
|
find_program(CCACHE_PROGRAM ccache)
|
|
|
|
if(CCACHE_PROGRAM)
|
|
|
|
message(STATUS "CCache enabled")
|
|
|
|
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CCACHE_PROGRAM}")
|
|
|
|
endif()
|
2020-08-10 19:31:36 +01:00
|
|
|
endif()
|
|
|
|
|
2019-07-13 02:41:34 -07:00
|
|
|
if (ENABLE_XRAY)
|
|
|
|
add_compile_options(-fxray-instrument)
|
|
|
|
link_libraries(-fxray-instrument)
|
|
|
|
endif()
|
|
|
|
|
2021-11-26 14:41:26 -08:00
|
|
|
if (ENABLE_COMPILE_TIME_TRACE)
|
|
|
|
add_compile_options(-ftime-trace)
|
|
|
|
link_libraries(-ftime-trace)
|
|
|
|
endif()
|
|
|
|
|
2021-07-20 05:22:09 -07:00
|
|
|
set (PTHREAD_LIB pthread)
|
2022-03-09 19:53:40 +01:00
|
|
|
|
2023-08-03 13:58:20 -07:00
|
|
|
if (USE_LINKER)
|
|
|
|
message(STATUS "Overriding linker to: ${USE_LINKER}")
|
|
|
|
add_link_options("-fuse-ld=${USE_LINKER}")
|
2021-07-14 08:22:07 -07:00
|
|
|
endif()
|
|
|
|
|
2021-12-24 15:46:58 -08:00
|
|
|
if (ENABLE_LIBCXX)
|
|
|
|
message(WARNING "This is an unsupported configuration and should only be used for testing")
|
|
|
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -stdlib=libc++")
|
|
|
|
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -stdlib=libc++ -lc++abi")
|
|
|
|
endif()
|
|
|
|
|
2021-08-06 22:40:19 -07:00
|
|
|
if (NOT ENABLE_OFFLINE_TELEMETRY)
|
|
|
|
# Disable FEX offline telemetry entirely if asked
|
|
|
|
add_definitions(-DFEX_DISABLE_TELEMETRY=1)
|
|
|
|
endif()
|
|
|
|
|
2019-07-13 02:41:34 -07:00
|
|
|
if (ENABLE_ASAN)
|
2020-12-14 03:59:04 -08:00
|
|
|
add_definitions(-DENABLE_ASAN=1)
|
2021-04-04 22:07:40 -07:00
|
|
|
add_compile_options(-fno-omit-frame-pointer -fsanitize=address -fsanitize-address-use-after-scope)
|
|
|
|
link_libraries(-fno-omit-frame-pointer -fsanitize=address -fsanitize-address-use-after-scope)
|
2019-07-13 02:41:34 -07:00
|
|
|
endif()
|
|
|
|
|
|
|
|
if (ENABLE_TSAN)
|
|
|
|
add_compile_options(-fno-omit-frame-pointer -fsanitize=thread)
|
|
|
|
link_libraries(-fno-omit-frame-pointer -fsanitize=thread)
|
|
|
|
endif()
|
|
|
|
|
2024-07-01 15:02:16 +02:00
|
|
|
if (ENABLE_COVERAGE)
|
|
|
|
add_compile_options(-fprofile-instr-generate -fcoverage-mapping)
|
|
|
|
link_libraries(-fprofile-instr-generate -fcoverage-mapping)
|
|
|
|
endif()
|
|
|
|
|
2023-04-10 17:07:08 -07:00
|
|
|
if (ENABLE_JEMALLOC_GLIBC_ALLOC)
|
|
|
|
# The glibc jemalloc subproject which hooks the glibc allocator.
|
|
|
|
# Required for thunks to work.
|
|
|
|
# All host native libraries will use this allocator, while *most* other FEX internal allocations will use the other jemalloc allocator.
|
|
|
|
add_definitions(-DENABLE_JEMALLOC_GLIBC=1)
|
|
|
|
add_subdirectory(External/jemalloc_glibc/)
|
2024-06-26 15:53:49 +01:00
|
|
|
elseif (NOT MINGW_BUILD)
|
2023-04-10 17:07:08 -07:00
|
|
|
message (STATUS
|
|
|
|
" jemalloc glibc allocator disabled!\n"
|
|
|
|
" This is not a recommended configuration!\n"
|
|
|
|
" This will very explicitly break thunk execution!\n"
|
|
|
|
" Use at your own risk!")
|
|
|
|
endif()
|
|
|
|
|
2021-07-22 18:16:24 -07:00
|
|
|
if (ENABLE_JEMALLOC)
|
2023-04-10 17:07:08 -07:00
|
|
|
# The jemalloc subproject that all FEXCore fextl objects allocate through.
|
2021-07-22 18:16:24 -07:00
|
|
|
add_definitions(-DENABLE_JEMALLOC=1)
|
2021-08-26 01:20:54 -07:00
|
|
|
add_subdirectory(External/jemalloc/)
|
|
|
|
include_directories(External/jemalloc/pregen/include/)
|
2024-06-26 15:53:49 +01:00
|
|
|
elseif (NOT MINGW_BUILD)
|
2021-07-22 18:16:24 -07:00
|
|
|
message (STATUS
|
|
|
|
" jemalloc disabled!\n"
|
|
|
|
" This is not a recommended configuration!\n"
|
|
|
|
" This will very explicitly break 32-bit application execution!\n"
|
|
|
|
" Use at your own risk!")
|
|
|
|
endif()
|
|
|
|
|
2024-07-19 19:09:59 +00:00
|
|
|
if (USE_PDB_DEBUGINFO)
|
|
|
|
add_compile_options(-g -gcodeview)
|
|
|
|
add_link_options(-g -Wl,--pdb=)
|
|
|
|
endif()
|
|
|
|
|
2019-07-13 02:41:34 -07:00
|
|
|
set (CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} -fno-omit-frame-pointer")
|
|
|
|
set (CMAKE_LINKER_FLAGS_RELWITHDEBINFO "${CMAKE_LINKER_FLAGS_RELWITHDEBINFO} -fno-omit-frame-pointer")
|
|
|
|
|
|
|
|
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer")
|
|
|
|
set (CMAKE_LINKER_FLAGS_RELEASE "${CMAKE_LINKER_FLAGS_RELEASE} -fomit-frame-pointer")
|
|
|
|
|
2022-02-26 00:37:32 -08:00
|
|
|
include_directories(External/robin-map/include/)
|
|
|
|
|
2023-01-12 13:55:00 -08:00
|
|
|
if (BUILD_TESTS)
|
|
|
|
# Enable vixl disassembler if tests are enabled.
|
|
|
|
set(COMPILE_VIXL_DISASSEMBLER TRUE)
|
|
|
|
endif()
|
|
|
|
|
2021-03-05 15:07:10 +13:00
|
|
|
add_subdirectory(External/vixl/)
|
2023-08-10 18:45:14 +02:00
|
|
|
include_directories(SYSTEM External/vixl/src/)
|
2021-03-05 15:07:10 +13:00
|
|
|
|
2020-08-19 23:25:29 -07:00
|
|
|
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
|
|
|
# This means we were attempted to get compiled with GCC
|
|
|
|
message(FATAL_ERROR "FEX doesn't support getting compiled with GCC!")
|
|
|
|
endif()
|
|
|
|
|
2021-04-18 18:11:24 -07:00
|
|
|
find_package(PkgConfig REQUIRED)
|
2021-03-06 06:06:59 -08:00
|
|
|
find_package(Python 3.0 REQUIRED COMPONENTS Interpreter)
|
2021-07-05 17:40:09 -07:00
|
|
|
|
2024-02-26 23:29:14 -08:00
|
|
|
set(XXHASH_BUNDLED_MODE TRUE)
|
|
|
|
set(XXHASH_BUILD_XXHSUM FALSE)
|
|
|
|
set(BUILD_SHARED_LIBS OFF)
|
|
|
|
add_subdirectory(External/xxhash/cmake_unofficial/)
|
2021-02-05 10:36:52 -08:00
|
|
|
|
2019-07-13 02:41:34 -07:00
|
|
|
add_definitions(-Wno-trigraphs)
|
2020-12-05 21:17:07 -08:00
|
|
|
add_definitions(-DGLOBAL_DATA_DIRECTORY="${DATA_DIRECTORY}/")
|
2019-07-13 02:41:34 -07:00
|
|
|
|
2021-11-29 13:02:14 -08:00
|
|
|
if (BUILD_TESTS)
|
|
|
|
add_subdirectory(External/Catch2/)
|
|
|
|
|
|
|
|
# Pull in catch_discover_tests definition
|
|
|
|
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/External/Catch2/contrib/")
|
|
|
|
include(Catch)
|
|
|
|
endif()
|
|
|
|
|
2023-07-10 12:26:39 -07:00
|
|
|
# Disable fmt install
|
|
|
|
set(FMT_INSTALL OFF)
|
2021-05-20 13:18:36 -04:00
|
|
|
add_subdirectory(External/fmt/)
|
|
|
|
|
2019-07-13 02:41:34 -07:00
|
|
|
add_subdirectory(External/imgui/)
|
|
|
|
include_directories(External/imgui/)
|
|
|
|
|
|
|
|
add_subdirectory(External/tiny-json/)
|
|
|
|
include_directories(External/tiny-json/)
|
2020-03-05 23:41:29 -08:00
|
|
|
|
2019-07-13 02:41:34 -07:00
|
|
|
include_directories(Source/)
|
|
|
|
include_directories("${CMAKE_BINARY_DIR}/Source/")
|
|
|
|
|
|
|
|
include(CheckCXXCompilerFlag)
|
|
|
|
|
|
|
|
# Add in diagnostic colours if the option is available.
|
|
|
|
# Ninja code generator will kill colours if this isn't here
|
|
|
|
check_cxx_compiler_flag(-fdiagnostics-color=always GCC_COLOR)
|
|
|
|
check_cxx_compiler_flag(-fcolor-diagnostics CLANG_COLOR)
|
2020-11-20 01:58:58 -08:00
|
|
|
check_cxx_compiler_flag(-Wno-deprecated-enum-enum-conversion ENUM_ENUM_WARNING)
|
2019-07-13 02:41:34 -07:00
|
|
|
|
|
|
|
if (GCC_COLOR)
|
|
|
|
add_compile_options(-fdiagnostics-color=always)
|
|
|
|
endif()
|
|
|
|
if (CLANG_COLOR)
|
|
|
|
add_compile_options(-fcolor-diagnostics)
|
|
|
|
endif()
|
|
|
|
|
2020-11-20 01:58:58 -08:00
|
|
|
if(ENUM_ENUM_WARNING)
|
|
|
|
add_compile_options(-Wno-deprecated-enum-enum-conversion)
|
|
|
|
endif()
|
|
|
|
|
2021-03-12 19:16:38 -08:00
|
|
|
if(ENABLE_WERROR OR ENABLE_STRICT_WERROR)
|
|
|
|
add_compile_options(-Werror)
|
|
|
|
if (NOT ENABLE_STRICT_WERROR)
|
|
|
|
# Disable some Werror that can add frustration when developing
|
|
|
|
add_compile_options(-Wno-error=unused-variable)
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2023-11-08 05:50:33 -08:00
|
|
|
set(FEX_TUNE_COMPILE_FLAGS)
|
2022-01-05 13:48:35 -08:00
|
|
|
if (NOT TUNE_ARCH STREQUAL "generic")
|
|
|
|
check_cxx_compiler_flag("-march=${TUNE_ARCH}" COMPILER_SUPPORTS_ARCH_TYPE)
|
|
|
|
if(COMPILER_SUPPORTS_ARCH_TYPE)
|
2023-11-08 05:50:33 -08:00
|
|
|
list(APPEND FEX_TUNE_COMPILE_FLAGS "-march=${TUNE_ARCH}")
|
2022-01-05 13:48:35 -08:00
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Trying to compile arch type '${TUNE_ARCH}' but the compiler doesn't support this")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2021-12-29 17:14:40 -08:00
|
|
|
if (TUNE_CPU STREQUAL "native")
|
|
|
|
if(_M_ARM_64)
|
|
|
|
if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL 999999.0)
|
|
|
|
# Clang 12.0 fixed the -mcpu=native bug with mixed big.little implementers
|
|
|
|
# Clang can not currently check for native Apple M1 type in hypervisor. Currently disabled
|
|
|
|
check_cxx_compiler_flag("-mcpu=native" COMPILER_SUPPORTS_CPU_TYPE)
|
|
|
|
if(COMPILER_SUPPORTS_CPU_TYPE)
|
2023-11-08 05:50:33 -08:00
|
|
|
list(APPEND FEX_TUNE_COMPILE_FLAGS "-mcpu=native")
|
2021-12-29 17:14:40 -08:00
|
|
|
endif()
|
|
|
|
else()
|
|
|
|
# Due to an oversight in llvm, it declares any reasonably new Kryo CPU to only be ARMv8.0
|
|
|
|
# Manually detect newer CPU revisions until clang and llvm fixes their bug
|
|
|
|
# This script will either provide a supported CPU or 'native'
|
|
|
|
# Additionally -march doesn't work under AArch64+Clang, so you have to use -mcpu or -mtune
|
|
|
|
execute_process(COMMAND python3 "${PROJECT_SOURCE_DIR}/Scripts/aarch64_fit_native.py" "/proc/cpuinfo" "${CMAKE_CXX_COMPILER_VERSION}"
|
|
|
|
OUTPUT_VARIABLE AARCH64_CPU)
|
|
|
|
|
|
|
|
string(STRIP ${AARCH64_CPU} AARCH64_CPU)
|
|
|
|
|
|
|
|
check_cxx_compiler_flag("-mcpu=${AARCH64_CPU}" COMPILER_SUPPORTS_CPU_TYPE)
|
|
|
|
if(COMPILER_SUPPORTS_CPU_TYPE)
|
2023-11-08 05:50:33 -08:00
|
|
|
list(APPEND FEX_TUNE_COMPILE_FLAGS "-mcpu=${AARCH64_CPU}")
|
2021-12-29 17:14:40 -08:00
|
|
|
endif()
|
2021-04-16 18:39:06 -07:00
|
|
|
endif()
|
|
|
|
else()
|
2021-12-29 17:14:40 -08:00
|
|
|
check_cxx_compiler_flag("-march=native" COMPILER_SUPPORTS_MARCH_NATIVE)
|
|
|
|
if(COMPILER_SUPPORTS_MARCH_NATIVE)
|
2023-11-08 05:50:33 -08:00
|
|
|
list(APPEND FEX_TUNE_COMPILE_FLAGS "-march=native")
|
2021-04-16 18:39:06 -07:00
|
|
|
endif()
|
2021-01-19 03:21:10 -08:00
|
|
|
endif()
|
2021-10-21 20:39:49 -07:00
|
|
|
else()
|
2021-12-29 17:14:40 -08:00
|
|
|
check_cxx_compiler_flag("-mcpu=${TUNE_CPU}" COMPILER_SUPPORTS_CPU_TYPE)
|
|
|
|
if(COMPILER_SUPPORTS_CPU_TYPE)
|
2023-11-08 05:50:33 -08:00
|
|
|
list(APPEND FEX_TUNE_COMPILE_FLAGS "-mcpu=${TUNE_CPU}")
|
2021-12-29 17:14:40 -08:00
|
|
|
else()
|
|
|
|
message(FATAL_ERROR "Trying to compile cpu type '${TUNE_CPU}' but the compiler doesn't support this")
|
2021-10-21 20:39:49 -07:00
|
|
|
endif()
|
2021-01-19 03:21:10 -08:00
|
|
|
endif()
|
|
|
|
|
2021-03-10 12:38:16 -08:00
|
|
|
if (ENABLE_IWYU)
|
|
|
|
find_program(IWYU_EXE "iwyu")
|
|
|
|
if (IWYU_EXE)
|
|
|
|
message(STATUS "IWYU enabled")
|
|
|
|
set(CMAKE_CXX_INCLUDE_WHAT_YOU_USE "${IWYU_EXE}")
|
|
|
|
endif()
|
|
|
|
endif()
|
|
|
|
|
2019-07-13 02:41:34 -07:00
|
|
|
add_compile_options(-Wall)
|
|
|
|
|
2021-03-23 19:12:18 -07:00
|
|
|
configure_file(
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/include/Config.h.in
|
2021-06-15 19:06:49 -07:00
|
|
|
${CMAKE_BINARY_DIR}/generated/ConfigDefines.h)
|
2021-03-23 19:12:18 -07:00
|
|
|
|
2021-03-14 15:24:36 -07:00
|
|
|
if (BUILD_TESTS)
|
|
|
|
include(CTest)
|
|
|
|
enable_testing()
|
|
|
|
message(STATUS "Unit tests are enabled")
|
2024-07-01 15:03:22 +02:00
|
|
|
|
|
|
|
set (TEST_JOB_COUNT "" CACHE STRING "Override number of parallel jobs to use while running tests")
|
|
|
|
if (TEST_JOB_COUNT)
|
|
|
|
message(STATUS "Running tests with ${TEST_JOB_COUNT} jobs")
|
2024-07-08 21:38:56 +02:00
|
|
|
elseif(CMAKE_VERSION VERSION_LESS "3.29")
|
2024-07-01 15:03:22 +02:00
|
|
|
execute_process(COMMAND "nproc" OUTPUT_STRIP_TRAILING_WHITESPACE OUTPUT_VARIABLE TEST_JOB_COUNT)
|
|
|
|
endif()
|
|
|
|
set(TEST_JOB_FLAG "-j${TEST_JOB_COUNT}")
|
2021-03-14 15:24:36 -07:00
|
|
|
endif()
|
2021-12-24 15:43:25 -08:00
|
|
|
|
|
|
|
add_subdirectory(FEXHeaderUtils/)
|
2024-05-08 12:00:08 -07:00
|
|
|
add_subdirectory(CodeEmitter/)
|
2023-08-17 16:30:42 -04:00
|
|
|
add_subdirectory(FEXCore/)
|
2020-11-20 01:58:58 -08:00
|
|
|
|
2021-06-22 20:22:09 -07:00
|
|
|
# Binfmt_misc files must be installed prior to Source/ installs
|
|
|
|
add_subdirectory(Data/binfmts/)
|
|
|
|
|
2019-07-13 02:41:34 -07:00
|
|
|
add_subdirectory(Source/)
|
2021-03-23 22:32:16 -07:00
|
|
|
add_subdirectory(Data/AppConfig/)
|
2019-07-13 02:41:34 -07:00
|
|
|
|
2021-10-07 20:20:34 -07:00
|
|
|
# Install the ThunksDB file
|
2022-08-06 21:31:23 -07:00
|
|
|
file(GLOB CONFIG_SOURCES CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/Data/*.json)
|
|
|
|
|
|
|
|
# Any application configuration json file gets installed
|
|
|
|
foreach(CONFIG_SRC ${CONFIG_SOURCES})
|
|
|
|
install(FILES ${CONFIG_SRC}
|
|
|
|
DESTINATION ${DATA_DIRECTORY}/)
|
|
|
|
endforeach()
|
2021-10-07 20:20:34 -07:00
|
|
|
|
2019-07-13 02:41:34 -07:00
|
|
|
if (BUILD_TESTS)
|
|
|
|
add_subdirectory(unittests/)
|
|
|
|
endif()
|
2020-08-08 11:35:13 +03:00
|
|
|
|
2021-01-31 00:28:15 +13:00
|
|
|
if (BUILD_THUNKS)
|
2022-08-04 19:52:57 -07:00
|
|
|
set (FEX_PROJECT_SOURCE_DIR ${PROJECT_SOURCE_DIR})
|
2021-12-10 11:24:56 +01:00
|
|
|
add_subdirectory(ThunkLibs/Generator)
|
|
|
|
|
2022-02-10 11:23:43 +01:00
|
|
|
# Thunk targets for both host libraries and IDE integration
|
|
|
|
add_subdirectory(ThunkLibs/HostLibs)
|
2021-01-31 00:28:15 +13:00
|
|
|
|
2022-02-10 11:23:43 +01:00
|
|
|
# Thunk targets for IDE integration of guest code, only
|
|
|
|
add_subdirectory(ThunkLibs/GuestLibs)
|
2021-03-24 01:14:24 -07:00
|
|
|
|
2022-02-10 11:23:43 +01:00
|
|
|
# Thunk targets for guest libraries
|
|
|
|
include(ExternalProject)
|
2021-01-31 00:28:15 +13:00
|
|
|
ExternalProject_Add(guest-libs
|
|
|
|
PREFIX guest-libs
|
|
|
|
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ThunkLibs/GuestLibs"
|
|
|
|
BINARY_DIR "Guest"
|
2021-10-02 18:03:24 -07:00
|
|
|
CMAKE_ARGS
|
2022-09-24 20:24:38 -07:00
|
|
|
"-DBITNESS=64"
|
2021-10-02 18:03:24 -07:00
|
|
|
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
|
2023-10-03 11:39:46 +02:00
|
|
|
"-DBUILD_FEX_LINUX_TESTS=${BUILD_FEX_LINUX_TESTS}"
|
2022-10-09 22:49:31 -07:00
|
|
|
"-DENABLE_CLANG_THUNKS=${ENABLE_CLANG_THUNKS}"
|
2022-09-19 09:19:22 +02:00
|
|
|
"-DCMAKE_TOOLCHAIN_FILE:FILEPATH=${X86_64_TOOLCHAIN_FILE}"
|
2021-10-02 18:03:24 -07:00
|
|
|
"-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}"
|
2022-08-04 19:52:57 -07:00
|
|
|
"-DFEX_PROJECT_SOURCE_DIR=${FEX_PROJECT_SOURCE_DIR}"
|
2021-12-10 11:24:56 +01:00
|
|
|
"-DGENERATOR_EXE=$<TARGET_FILE:thunkgen>"
|
2021-01-31 00:28:15 +13:00
|
|
|
INSTALL_COMMAND ""
|
|
|
|
BUILD_ALWAYS ON
|
2021-12-10 11:24:56 +01:00
|
|
|
DEPENDS thunkgen
|
2021-01-31 00:28:15 +13:00
|
|
|
)
|
2021-03-24 01:14:24 -07:00
|
|
|
|
2022-09-24 20:24:38 -07:00
|
|
|
ExternalProject_Add(guest-libs-32
|
|
|
|
PREFIX guest-libs-32
|
|
|
|
SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/ThunkLibs/GuestLibs"
|
|
|
|
BINARY_DIR "Guest_32"
|
|
|
|
CMAKE_ARGS
|
|
|
|
"-DBITNESS=32"
|
|
|
|
"-DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}"
|
2023-10-03 11:39:46 +02:00
|
|
|
"-DBUILD_FEX_LINUX_TESTS=${BUILD_FEX_LINUX_TESTS}"
|
2022-10-09 22:49:31 -07:00
|
|
|
"-DENABLE_CLANG_THUNKS=${ENABLE_CLANG_THUNKS}"
|
2022-09-24 20:24:38 -07:00
|
|
|
"-DCMAKE_TOOLCHAIN_FILE:FILEPATH=${X86_32_TOOLCHAIN_FILE}"
|
|
|
|
"-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX}"
|
|
|
|
"-DFEX_PROJECT_SOURCE_DIR=${FEX_PROJECT_SOURCE_DIR}"
|
|
|
|
"-DGENERATOR_EXE=$<TARGET_FILE:thunkgen>"
|
|
|
|
INSTALL_COMMAND ""
|
|
|
|
BUILD_ALWAYS ON
|
|
|
|
DEPENDS thunkgen
|
|
|
|
)
|
|
|
|
|
2021-03-24 01:14:24 -07:00
|
|
|
install(
|
|
|
|
CODE "MESSAGE(\"-- Installing: guest-libs\")"
|
|
|
|
CODE "
|
2022-02-15 15:28:46 -08:00
|
|
|
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} --build . --target install
|
2021-03-24 01:14:24 -07:00
|
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Guest
|
|
|
|
)"
|
|
|
|
DEPENDS guest-libs
|
|
|
|
)
|
2022-09-14 18:16:16 -07:00
|
|
|
|
2022-09-24 20:24:38 -07:00
|
|
|
install(
|
|
|
|
CODE "MESSAGE(\"-- Installing: guest-libs-32\")"
|
|
|
|
CODE "
|
|
|
|
EXECUTE_PROCESS(COMMAND ${CMAKE_COMMAND} --build . --target install
|
|
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Guest_32
|
|
|
|
)"
|
|
|
|
DEPENDS guest-libs-32
|
|
|
|
)
|
|
|
|
|
2022-09-14 18:16:16 -07:00
|
|
|
add_custom_target(uninstall_guest-libs
|
|
|
|
COMMAND ${CMAKE_COMMAND} "--build" "." "--target" "uninstall"
|
|
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Guest
|
|
|
|
)
|
|
|
|
|
2022-09-24 20:24:38 -07:00
|
|
|
add_custom_target(uninstall_guest-libs-32
|
|
|
|
COMMAND ${CMAKE_COMMAND} "--build" "." "--target" "uninstall"
|
|
|
|
WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Guest_32
|
|
|
|
)
|
|
|
|
|
2022-09-14 18:16:16 -07:00
|
|
|
add_dependencies(uninstall uninstall_guest-libs)
|
2022-09-24 20:24:38 -07:00
|
|
|
add_dependencies(uninstall uninstall_guest-libs-32)
|
2021-01-31 00:28:15 +13:00
|
|
|
endif()
|
2021-06-22 20:24:29 -07:00
|
|
|
|
|
|
|
set(FEX_VERSION_MAJOR "0")
|
|
|
|
set(FEX_VERSION_MINOR "0")
|
|
|
|
set(FEX_VERSION_PATCH "0")
|
|
|
|
|
2021-12-30 22:55:46 -08:00
|
|
|
if (OVERRIDE_VERSION STREQUAL "detect")
|
|
|
|
find_package(Git)
|
|
|
|
if (GIT_FOUND)
|
|
|
|
execute_process(
|
|
|
|
COMMAND ${GIT_EXECUTABLE} describe --abbrev=0
|
|
|
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
|
|
|
OUTPUT_VARIABLE GIT_DESCRIBE_STRING
|
|
|
|
RESULT_VARIABLE GIT_ERROR
|
|
|
|
ERROR_QUIET
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
|
|
)
|
2021-06-22 20:24:29 -07:00
|
|
|
|
2021-12-30 22:55:46 -08:00
|
|
|
if (NOT ${GIT_ERROR} EQUAL 0)
|
|
|
|
# Likely built in a way that doesn't have tags
|
|
|
|
# Setup a version tag that is unknown
|
|
|
|
set(GIT_DESCRIBE_STRING "FEX-0000")
|
|
|
|
endif()
|
2021-06-22 20:24:29 -07:00
|
|
|
endif()
|
2021-12-30 22:55:46 -08:00
|
|
|
else()
|
|
|
|
set(GIT_DESCRIBE_STRING "FEX-${OVERRIDE_VERSION}")
|
|
|
|
endif()
|
2021-06-22 20:24:29 -07:00
|
|
|
|
2021-12-30 22:55:46 -08:00
|
|
|
# Parse the version here
|
|
|
|
# Change something like `FEX-2106.1-76-<hash>` in to a list
|
|
|
|
string(REPLACE "-" ";" DESCRIBE_LIST ${GIT_DESCRIBE_STRING})
|
2021-06-22 20:24:29 -07:00
|
|
|
|
2021-12-30 22:55:46 -08:00
|
|
|
# Extract the `2106.1` element
|
|
|
|
list(GET DESCRIBE_LIST 1 DESCRIBE_LIST)
|
2021-06-22 20:24:29 -07:00
|
|
|
|
2021-12-30 22:55:46 -08:00
|
|
|
# Change `2106.1` in to a list
|
|
|
|
string(REPLACE "." ";" DESCRIBE_LIST ${DESCRIBE_LIST})
|
2021-06-22 20:24:29 -07:00
|
|
|
|
2021-12-30 22:55:46 -08:00
|
|
|
# Calculate list size
|
|
|
|
list(LENGTH DESCRIBE_LIST LIST_SIZE)
|
2021-06-22 20:24:29 -07:00
|
|
|
|
2021-12-30 22:55:46 -08:00
|
|
|
# Pull out the major version
|
|
|
|
list(GET DESCRIBE_LIST 0 FEX_VERSION_MAJOR)
|
2021-06-22 20:24:29 -07:00
|
|
|
|
2021-12-30 22:55:46 -08:00
|
|
|
# Minor version only exists if there is a .1 at the end
|
|
|
|
# eg: 2106 versus 2106.1
|
|
|
|
if (LIST_SIZE GREATER 1)
|
|
|
|
list(GET DESCRIBE_LIST 1 FEX_VERSION_MINOR)
|
2021-06-22 20:24:29 -07:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# Package creation
|
|
|
|
set (CPACK_GENERATOR "DEB")
|
2022-08-04 19:22:11 -07:00
|
|
|
set (CPACK_PACKAGE_NAME fex-emu)
|
2021-11-21 10:34:44 -08:00
|
|
|
set (CPACK_PACKAGE_FILE_NAME "${CPACK_PACKAGE_NAME}-${GIT_DESCRIBE_STRING}_${CMAKE_SYSTEM_PROCESSOR}")
|
2022-09-02 10:43:07 -07:00
|
|
|
set (CPACK_PACKAGE_CONTACT "FEX-Emu Maintainers <team@fex-emu.com>")
|
2021-06-22 20:24:29 -07:00
|
|
|
set (CPACK_PACKAGE_VERSION_MAJOR "${FEX_VERSION_MAJOR}")
|
|
|
|
set (CPACK_PACKAGE_VERSION_MINOR "${FEX_VERSION_MINOR}")
|
|
|
|
set (CPACK_PACKAGE_VERSION_PATCH "${FEX_VERSION_PATCH}")
|
2021-11-21 10:32:36 -08:00
|
|
|
set (CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/CPack/Description.txt")
|
2021-06-22 20:24:29 -07:00
|
|
|
|
|
|
|
# Debian defines
|
2021-11-21 10:40:30 -08:00
|
|
|
set (CPACK_DEBIAN_PACKAGE_DEPENDS "libc6, libstdc++6, libepoxy0, libsdl2-2.0-0, libegl1, libx11-6, squashfuse")
|
2021-11-21 10:38:56 -08:00
|
|
|
set (CPACK_DEBIAN_PACKAGE_CONTROL_EXTRA
|
|
|
|
"${CMAKE_CURRENT_SOURCE_DIR}/CPack/postinst;${CMAKE_CURRENT_SOURCE_DIR}/CPack/prerm;${CMAKE_CURRENT_SOURCE_DIR}/CPack/triggers")
|
2021-06-22 20:24:29 -07:00
|
|
|
if (CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64")
|
|
|
|
# binfmt_misc conflicts with qemu-user-static
|
|
|
|
# We also only install binfmt_misc on aarch64 hosts
|
2021-11-21 10:36:02 -08:00
|
|
|
set (CPACK_DEBIAN_PACKAGE_CONFLICTS "${CPACK_DEBIAN_PACKAGE_CONFLICTS}, qemu-user-static")
|
2021-06-22 20:24:29 -07:00
|
|
|
endif()
|
|
|
|
include (CPack)
|