[cmake] refactor: Use CPM over submodules #143

Merged
crueter merged 42 commits from refactor/cpm into master 2025-08-04 04:50:17 +02:00
4 changed files with 12 additions and 2 deletions
Showing only changes of commit 651deea683 - Show all commits

View file

@ -13,8 +13,6 @@ set(CMAKE_POLICY_DEFAULT_CMP0077 NEW)
# Disable tests/tools in all externals supporting the standard option name # Disable tests/tools in all externals supporting the standard option name
set(BUILD_TESTING OFF) set(BUILD_TESTING OFF)
set(BUILD_TESTS OFF)
set(BUILD_TOOLS OFF)
# Build only static externals # Build only static externals
set(BUILD_SHARED_LIBS OFF) set(BUILD_SHARED_LIBS OFF)

View file

@ -235,6 +235,12 @@ else() # MINGW OR (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
) )
endif() endif()
if(UNIX)
set(PLATFORM_POSIX TRUE)
else()
set(PLATFORM_WINDOWS TRUE)
endif()
include(CheckFunctionExists) include(CheckFunctionExists)
include(CheckIncludeFiles) include(CheckIncludeFiles)
include(CheckTypeSize) include(CheckTypeSize)

View file

@ -93,3 +93,7 @@
/* Oldest Windows version supported */ /* Oldest Windows version supported */
#define WINVER 0x0501 #define WINVER 0x0501
#cmakedefine PLATFORM_POSIX
#cmakedefine PLATFORM_WINDOWS

View file

@ -10,6 +10,8 @@ CPMAddPackage(
FIND_PACKAGE_ARGUMENTS "CONFIG" # not sure this works outside of gentoo FIND_PACKAGE_ARGUMENTS "CONFIG" # not sure this works outside of gentoo
OPTIONS OPTIONS
"USE_SANITIZERS OFF" "USE_SANITIZERS OFF"
"BUILD_TESTS OFF"
"BUILD_TOOLS OFF"
) )
if (cubeb_ADDED) if (cubeb_ADDED)