2022-02-23 05:28:21 +00:00
|
|
|
option(BUILD_ATHENA "Build Athena libraries from source" ON)
|
2022-08-03 22:19:11 +00:00
|
|
|
if (CMAKE_HOST_SYSTEM_NAME STREQUAL Windows OR CMAKE_HOST_SYSTEM_NAME STREQUAL Darwin)
|
2022-02-23 05:28:21 +00:00
|
|
|
# Default to binary atdna on Windows & macOS
|
|
|
|
option(BUILD_ATDNA "Build atdna utility from source (requires LLVM)" OFF)
|
|
|
|
else ()
|
|
|
|
option(BUILD_ATDNA "Build atdna utility from source (requires LLVM)" ON)
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (NOT BUILD_ATDNA)
|
|
|
|
set(ATHENA_BASE_URL "https://github.com/libAthena/athena/releases/download/latest")
|
2022-08-03 22:19:11 +00:00
|
|
|
if (CMAKE_HOST_SYSTEM_NAME STREQUAL Windows)
|
2022-02-23 05:28:21 +00:00
|
|
|
set(ATHENA_EXT 7z)
|
|
|
|
else ()
|
|
|
|
set(ATHENA_EXT tar.gz)
|
|
|
|
endif ()
|
|
|
|
include(FetchContent)
|
|
|
|
FetchContent_Declare(athena-host
|
2022-05-27 19:52:16 +00:00
|
|
|
URL "${ATHENA_BASE_URL}/athena-${HOST_PLATFORM_NAME}-${ATHENA_HOST_ARCH}.${ATHENA_EXT}")
|
2022-02-23 05:28:21 +00:00
|
|
|
message(STATUS "Fetching atdna host binary")
|
|
|
|
FetchContent_Populate(athena-host)
|
|
|
|
include(${athena-host_SOURCE_DIR}/lib/cmake/atdna/atdnaConfig.cmake)
|
2022-03-12 19:45:17 +00:00
|
|
|
set(atdna_DIR "${athena-host_SOURCE_DIR}/lib/cmake/atdna" PARENT_SCOPE)
|
2022-02-23 05:28:21 +00:00
|
|
|
endif ()
|
|
|
|
|
|
|
|
if (BUILD_ATHENA OR BUILD_ATDNA)
|
|
|
|
add_subdirectory(athena EXCLUDE_FROM_ALL)
|
|
|
|
else ()
|
|
|
|
if (ATHENA_ARCH STREQUAL ATHENA_HOST_ARCH)
|
|
|
|
set(athena_SOURCE_DIR "${athena-host_SOURCE_DIR}")
|
|
|
|
else ()
|
|
|
|
FetchContent_Declare(athena
|
2022-05-27 19:52:16 +00:00
|
|
|
URL "${ATHENA_BASE_URL}/athena-${HOST_PLATFORM_NAME}-${ATHENA_ARCH}.tar.gz")
|
2022-02-23 05:28:21 +00:00
|
|
|
FetchContent_Populate(athena)
|
|
|
|
endif ()
|
|
|
|
include(${athena_SOURCE_DIR}/lib/cmake/athena/AthenaConfig.cmake)
|
|
|
|
include(${athena_SOURCE_DIR}/lib/cmake/lzokay/lzokayConfig.cmake)
|
|
|
|
add_library(lzokay ALIAS lzokay::lzokay)
|
|
|
|
include(athena/atdna/atdnaHelpers.cmake)
|
|
|
|
endif ()
|
|
|
|
|
2022-07-29 20:16:55 +00:00
|
|
|
# Enable MoltenVK
|
|
|
|
#if (CMAKE_SYSTEM_NAME STREQUAL Darwin)
|
|
|
|
# set(DAWN_ENABLE_VULKAN ON CACHE BOOL "Enable compilation of the Vulkan backend" FORCE)
|
|
|
|
#endif()
|
|
|
|
set(AURORA_NATIVE_MATRIX ON CACHE BOOL "Assume OpenGL-layout matrices, disables transposing" FORCE)
|
|
|
|
add_subdirectory(aurora)
|
2022-06-01 00:59:59 +00:00
|
|
|
|
|
|
|
# boo must come after SDL2
|
2022-03-09 05:06:26 +00:00
|
|
|
add_subdirectory(boo EXCLUDE_FROM_ALL)
|
|
|
|
add_subdirectory(nod EXCLUDE_FROM_ALL)
|
|
|
|
# amuse must come after athena/atdna, boo and nod
|
2022-02-23 05:28:21 +00:00
|
|
|
add_subdirectory(amuse EXCLUDE_FROM_ALL)
|
|
|
|
|
2022-05-27 19:52:16 +00:00
|
|
|
if (NOT GEKKO AND NOT NX AND NOT IOS AND NOT TVOS)
|
2022-02-23 05:28:21 +00:00
|
|
|
set(PROJECT_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/discord-rpc)
|
|
|
|
if (NOT CMAKE_INSTALL_LIBDIR)
|
|
|
|
set(CMAKE_INSTALL_LIBDIR ${CMAKE_BINARY_DIR}/fake-prefix)
|
|
|
|
endif ()
|
|
|
|
add_subdirectory(discord-rpc/src EXCLUDE_FROM_ALL)
|
|
|
|
target_include_directories(discord-rpc PRIVATE rapidjson/include PUBLIC discord-rpc/include)
|
|
|
|
if (APPLE)
|
|
|
|
# remove their nasty hack
|
|
|
|
get_target_property(DISCORD_LINK_LIBRARIES discord-rpc INTERFACE_LINK_LIBRARIES)
|
|
|
|
list(REMOVE_ITEM DISCORD_LINK_LIBRARIES "-framework AppKit, -mmacosx-version-min=10.10")
|
|
|
|
set_target_properties(discord-rpc PROPERTIES INTERFACE_LINK_LIBRARIES "${DISCORD_LINK_LIBRARIES}")
|
|
|
|
endif ()
|
|
|
|
if (UNIX)
|
|
|
|
# remove another nasty hack
|
|
|
|
get_target_property(DISCORD_COMPILE_OPTIONS discord-rpc COMPILE_OPTIONS)
|
|
|
|
list(REMOVE_ITEM DISCORD_COMPILE_OPTIONS "-g")
|
|
|
|
set_target_properties(discord-rpc PROPERTIES COMPILE_OPTIONS "${DISCORD_COMPILE_OPTIONS}")
|
|
|
|
endif ()
|
|
|
|
endif ()
|
|
|
|
|
|
|
|
add_subdirectory(jbus EXCLUDE_FROM_ALL)
|
|
|
|
add_subdirectory(kabufuda EXCLUDE_FROM_ALL)
|
|
|
|
|
2022-08-28 18:06:58 +00:00
|
|
|
option(NFD_PORTAL "Use xdg-desktop-portal instead of GTK" ON)
|
2022-02-23 05:28:21 +00:00
|
|
|
if (CMAKE_SYSTEM_NAME STREQUAL "Linux")
|
2022-08-28 18:06:58 +00:00
|
|
|
add_subdirectory(nativefiledialog-extended)
|
|
|
|
target_compile_definitions(nfd INTERFACE NATIVEFILEDIALOG_SUPPORTED)
|
2022-02-23 05:28:21 +00:00
|
|
|
elseif (CMAKE_SYSTEM_NAME STREQUAL "Darwin")
|
2022-08-28 18:06:58 +00:00
|
|
|
add_subdirectory(nativefiledialog-extended)
|
|
|
|
target_compile_definitions(nfd INTERFACE NATIVEFILEDIALOG_SUPPORTED)
|
2022-02-23 05:28:21 +00:00
|
|
|
elseif (CMAKE_SYSTEM_NAME STREQUAL "Windows")
|
2022-08-28 18:06:58 +00:00
|
|
|
add_subdirectory(nativefiledialog-extended)
|
|
|
|
target_compile_definitions(nfd INTERFACE NATIVEFILEDIALOG_SUPPORTED)
|
2022-02-23 05:28:21 +00:00
|
|
|
else ()
|
|
|
|
message(WARNING "nativefiledialog unsupported for ${CMAKE_SYSTEM_NAME}")
|
|
|
|
endif ()
|
|
|
|
|
2022-03-09 05:06:26 +00:00
|
|
|
option(OPTICK_ENABLED "Enable profiling with Optick" OFF)
|
|
|
|
set(OPTICK_USE_VULKAN ${DAWN_ENABLE_VULKAN} CACHE BOOL "Built-in support for Vulkan" FORCE)
|
|
|
|
set(OPTICK_INSTALL_TARGETS OFF CACHE BOOL "Should optick be installed? Set to OFF if you use add_subdirectory to include Optick." FORCE)
|
|
|
|
add_subdirectory(optick)
|
|
|
|
if (NOT MSVC)
|
|
|
|
target_compile_options(OptickCore PRIVATE -Wno-implicit-fallthrough)
|
|
|
|
endif ()
|
|
|
|
|
2022-02-23 05:28:21 +00:00
|
|
|
add_subdirectory(libjpeg-turbo EXCLUDE_FROM_ALL)
|
|
|
|
add_subdirectory(zeus EXCLUDE_FROM_ALL)
|