solanaceae_toxic_games/external/CMakeLists.txt

90 lines
2.5 KiB
CMake
Raw Normal View History

2023-11-25 19:41:55 +01:00
cmake_minimum_required(VERSION 3.24 FATAL_ERROR)
include(FetchContent)
if (NOT TARGET imgui)
2023-11-25 20:43:00 +01:00
message("II using FetchContent imgui")
2023-11-25 19:41:55 +01:00
FetchContent_Declare(imgui
GIT_REPOSITORY https://github.com/ocornut/imgui.git
2024-01-18 18:34:21 +01:00
GIT_TAG d6cb3c9 # v1.90.1
2023-11-25 19:41:55 +01:00
EXCLUDE_FROM_ALL
)
FetchContent_GetProperties(imgui)
if(NOT imgui_POPULATED)
FetchContent_Populate(imgui)
add_library(imgui STATIC
${imgui_SOURCE_DIR}/imgui.h
${imgui_SOURCE_DIR}/imgui_internal.h
${imgui_SOURCE_DIR}/imgui.cpp
${imgui_SOURCE_DIR}/imgui_demo.cpp
${imgui_SOURCE_DIR}/imgui_draw.cpp
${imgui_SOURCE_DIR}/imgui_tables.cpp
${imgui_SOURCE_DIR}/imgui_widgets.cpp
${imgui_SOURCE_DIR}/imstb_rectpack.h
${imgui_SOURCE_DIR}/imstb_textedit.h
${imgui_SOURCE_DIR}/imstb_truetype.h
${imgui_SOURCE_DIR}/misc/cpp/imgui_stdlib.h
${imgui_SOURCE_DIR}/misc/cpp/imgui_stdlib.cpp
)
target_include_directories(imgui PUBLIC ${imgui_SOURCE_DIR})
2024-01-07 17:57:34 +01:00
target_compile_features(imgui PUBLIC cxx_std_11)
2023-11-25 19:41:55 +01:00
endif()
endif()
# TODO: move entt dep into solanaceae_contact
if (NOT TARGET EnTT::EnTT)
2023-11-25 20:43:00 +01:00
message("II using FetchContent EnTT")
2023-11-25 19:41:55 +01:00
FetchContent_Declare(EnTT
GIT_REPOSITORY https://github.com/skypjack/entt.git
GIT_TAG v3.12.2
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(EnTT)
endif()
if (NOT TARGET solanaceae_contact)
2023-11-25 20:43:00 +01:00
message("II using FetchContent solanaceae_contact")
2023-11-25 19:41:55 +01:00
FetchContent_Declare(solanaceae_contact
GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_contact.git
GIT_TAG master
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(solanaceae_contact)
endif()
if (NOT TARGET solanaceae_plugin)
2023-11-25 20:43:00 +01:00
message("II using FetchContent solanaceae_plugin")
2023-11-25 19:41:55 +01:00
FetchContent_Declare(solanaceae_plugin
GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_plugin.git
GIT_TAG master
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(solanaceae_plugin)
endif()
if (NOT TARGET solanaceae_toxcore)
2023-11-25 20:43:00 +01:00
message("II using FetchContent solanaceae_toxcore")
2023-11-25 19:41:55 +01:00
# set option to interface only? or make default
FetchContent_Declare(solanaceae_toxcore
GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_toxcore.git
GIT_TAG master
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(solanaceae_toxcore)
endif()
if (NOT TARGET solanaceae_tox_contacts AND NOT TARGET solanaceae_tox_messages)
2023-11-25 20:43:00 +01:00
message("II using FetchContent solanaceae_tox")
2023-11-25 19:41:55 +01:00
FetchContent_Declare(solanaceae_tox
GIT_REPOSITORY https://github.com/Green-Sky/solanaceae_tox.git
GIT_TAG master
EXCLUDE_FROM_ALL
)
FetchContent_MakeAvailable(solanaceae_tox)
endif()