CMake: Apply editorconfig formatting

This commit is contained in:
Joshua Vandaële
2026-01-04 12:53:05 +01:00
parent 75560925f1
commit 7f6bf67182
37 changed files with 708 additions and 708 deletions

View File

@@ -1,12 +1,12 @@
add_library(FatFs STATIC
ff.c
ffunicode.c
diskio.h
ff.h
ffconf.h
ff.c
ffunicode.c
diskio.h
ff.h
ffconf.h
)
target_include_directories(FatFs
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
)

View File

@@ -1,25 +1,25 @@
set(SRC_NETWORK
SFML/src/SFML/Network/Http.cpp
SFML/src/SFML/Network/IpAddress.cpp
SFML/src/SFML/Network/Packet.cpp
SFML/src/SFML/Network/Socket.cpp
SFML/src/SFML/Network/SocketSelector.cpp
SFML/src/SFML/Network/TcpListener.cpp
SFML/src/SFML/Network/TcpSocket.cpp
SFML/src/SFML/Network/UdpSocket.cpp
SFML/src/SFML/Network/Http.cpp
SFML/src/SFML/Network/IpAddress.cpp
SFML/src/SFML/Network/Packet.cpp
SFML/src/SFML/Network/Socket.cpp
SFML/src/SFML/Network/SocketSelector.cpp
SFML/src/SFML/Network/TcpListener.cpp
SFML/src/SFML/Network/TcpSocket.cpp
SFML/src/SFML/Network/UdpSocket.cpp
)
if(WIN32)
list(APPEND SRC_NETWORK SFML/src/SFML/Network/Win32/SocketImpl.cpp)
list(APPEND SRC_NETWORK SFML/src/SFML/Network/Win32/SocketImpl.cpp)
else()
list(APPEND SRC_NETWORK SFML/src/SFML/Network/Unix/SocketImpl.cpp)
list(APPEND SRC_NETWORK SFML/src/SFML/Network/Unix/SocketImpl.cpp)
endif()
set(SRC_SYSTEM
SFML/src/SFML/System/Err.cpp
SFML/include/SFML/System/String.hpp
SFML/src/SFML/System/String.cpp
SFML/src/SFML/System/Utils.cpp
SFML/src/SFML/System/Err.cpp
SFML/include/SFML/System/String.hpp
SFML/src/SFML/System/String.cpp
SFML/src/SFML/System/Utils.cpp
)
add_library(sfml-network STATIC ${SRC_NETWORK})
@@ -31,4 +31,4 @@ target_include_directories(sfml-system PUBLIC SFML/include PRIVATE SFML/src)
target_include_directories(sfml-network PUBLIC SFML/include PRIVATE SFML/src)
target_link_libraries(sfml-network PUBLIC sfml-system)
dolphin_disable_warnings(sfml-network)
dolphin_disable_warnings(sfml-system)
dolphin_disable_warnings(sfml-system)

View File

@@ -9,28 +9,28 @@ option(WIL_BUILD_PACKAGING "Sets option to build the packaging, default on" ON)
option(WIL_BUILD_TESTS "Sets option to build the unit tests, default on" ON)
if (NOT DEFINED WIL_BUILD_VERSION)
set(WIL_BUILD_VERSION "0.0.0")
set(WIL_BUILD_VERSION "0.0.0")
endif()
if (NOT DEFINED CPPWINRT_VERSION)
set(CPPWINRT_VERSION "2.0.221121.5")
set(CPPWINRT_VERSION "2.0.221121.5")
endif()
# Detect the Windows SDK version. If we're using the Visual Studio generator, this will be provided for us. Otherwise
# we'll need to assume that this value comes from the command line (e.g. through the VS command prompt)
if (DEFINED CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION)
set(WIL_WINDOWS_SDK_VERSION ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION})
set(WIL_WINDOWS_SDK_VERSION ${CMAKE_VS_WINDOWS_TARGET_PLATFORM_VERSION})
else()
# This has a trailing backslash for whatever reason...
string(REGEX REPLACE "\\\\$" "" WIL_WINDOWS_SDK_VERSION "$ENV{WindowsSDKVersion}")
# This has a trailing backslash for whatever reason...
string(REGEX REPLACE "\\\\$" "" WIL_WINDOWS_SDK_VERSION "$ENV{WindowsSDKVersion}")
endif()
if (${WIL_BUILD_PACKAGING})
add_subdirectory(packaging)
add_subdirectory(packaging)
endif()
if (${WIL_BUILD_TESTS})
add_subdirectory(tests)
add_subdirectory(tests)
endif()
# Gather headers into an interface library.
@@ -40,23 +40,23 @@ add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
# The interface's include directory.
target_include_directories(${PROJECT_NAME} INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
)
# Include the .natvis files
if (MSVC)
target_sources(${PROJECT_NAME} INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/natvis/wil.natvis>")
target_sources(${PROJECT_NAME} INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/natvis/wil.natvis>")
endif()
# Install Package Configuration
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME_LOWER}_targets)
install(EXPORT ${PROJECT_NAME_LOWER}_targets
NAMESPACE ${PROJECT_NAME}::
FILE ${PROJECT_NAME_LOWER}Config.cmake
DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/${PROJECT_NAME}"
NAMESPACE ${PROJECT_NAME}::
FILE ${PROJECT_NAME_LOWER}Config.cmake
DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/${PROJECT_NAME}"
)
# Install the headers at a standard cmake location.

View File

@@ -16,24 +16,24 @@ set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
# in CMake 2.4.x does not automatically do so and we want
# compatibility with CMake 2.4.x.
if(HAVE_SYS_TYPES_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
endif()
if(HAVE_STDINT_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
endif()
if(HAVE_STDDEF_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
endif()
check_type_size(off64_t OFF64_T)
if(HAVE_OFF64_T)
add_definitions(-D_LARGEFILE64_SOURCE=1)
add_definitions(-D_LARGEFILE64_SOURCE=1)
endif()
set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
# Check for fseeko
check_function_exists(fseeko HAVE_FSEEKO)
if(NOT HAVE_FSEEKO)
add_definitions(-DNO_FSEEKO)
add_definitions(-DNO_FSEEKO)
endif()
#
@@ -41,12 +41,12 @@ endif()
#
check_include_file(unistd.h HAVE_UNISTD_H)
if(HAVE_UNISTD_H)
add_definitions(-DHAVE_UNISTD_H)
add_definitions(-DHAVE_UNISTD_H)
endif()
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
endif()
#============================================================================
@@ -54,19 +54,19 @@ endif()
#============================================================================
set(BZIP2_PUBLIC_HDRS
bzip2/bzlib.h
bzip2/bzlib.h
)
set(BZIP2_PRIVATE_HDRS
bzip2/bzlib_private.h
bzip2/bzlib_private.h
)
set(BZIP2_SRCS
bzip2/blocksort.c
bzip2/huffman.c
bzip2/crctable.c
bzip2/randtable.c
bzip2/compress.c
bzip2/decompress.c
bzip2/bzlib.c
bzip2/blocksort.c
bzip2/huffman.c
bzip2/crctable.c
bzip2/randtable.c
bzip2/compress.c
bzip2/decompress.c
bzip2/bzlib.c
)
add_library(bzip2 STATIC ${BZIP2_SRCS} ${BZIP2_PUBLIC_HDRS} ${BZIP2_PRIVATE_HDRS})
@@ -75,5 +75,5 @@ dolphin_disable_warnings(bzip2)
target_include_directories(bzip2
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/bzip2
${CMAKE_CURRENT_SOURCE_DIR}/bzip2
)

View File

@@ -1,6 +1,6 @@
set(SRCS
cpp-optparse/OptionParser.cpp
cpp-optparse/OptionParser.h
cpp-optparse/OptionParser.cpp
cpp-optparse/OptionParser.h
)
add_library(cpp-optparse STATIC ${SRCS})
@@ -10,5 +10,5 @@ dolphin_disable_warnings(cpp-optparse)
target_include_directories(cpp-optparse
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/cpp-optparse
${CMAKE_CURRENT_SOURCE_DIR}/cpp-optparse
)

View File

@@ -5,8 +5,8 @@ include(GNUInstallDirs)
# format
file(GLOB_RECURSE ALL_SOURCE_FILES
include/*.h
src/*.cpp src/*.h src/*.c
include/*.h
src/*.cpp src/*.h src/*.c
)
# add subdirs

View File

@@ -16,9 +16,9 @@ add_library(imgui STATIC ${SRCS})
dolphin_disable_warnings(imgui)
target_include_directories(imgui
PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/imgui"
PUBLIC
"${CMAKE_CURRENT_SOURCE_DIR}"
"${CMAKE_CURRENT_SOURCE_DIR}/imgui"
)
target_compile_definitions(imgui
@@ -27,6 +27,6 @@ target_compile_definitions(imgui
)
target_link_libraries(imgui
PRIVATE
fmt::fmt
PRIVATE
fmt::fmt
)

View File

@@ -3,14 +3,14 @@ add_subdirectory(lib)
add_subdirectory(libcharset)
add_library(iconv STATIC
lib/iconv.c
lib/iconv.c
)
target_link_libraries(iconv PUBLIC libcharset)
target_include_directories(iconv
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/lib>
PUBLIC
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_BINARY_DIR}/lib>
)
dolphin_disable_warnings(iconv)

View File

@@ -56,4 +56,4 @@ configure_file(
${CMAKE_CURRENT_SOURCE_DIR}/config.h.in
${CMAKE_CURRENT_BINARY_DIR}/config.h
@ONLY
)
)

View File

@@ -14,24 +14,24 @@ set(CMAKE_REQUIRED_DEFINITIONS -D_LARGEFILE64_SOURCE=1)
# in CMake 2.4.x does not automatically do so and we want
# compatibility with CMake 2.4.x.
if(HAVE_SYS_TYPES_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
endif()
if(HAVE_STDINT_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
endif()
if(HAVE_STDDEF_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
endif()
check_type_size(off64_t OFF64_T)
if(HAVE_OFF64_T)
add_definitions(-D_LARGEFILE64_SOURCE=1)
add_definitions(-D_LARGEFILE64_SOURCE=1)
endif()
set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
# Check for fseeko
check_function_exists(fseeko HAVE_FSEEKO)
if(NOT HAVE_FSEEKO)
add_definitions(-DNO_FSEEKO)
add_definitions(-DNO_FSEEKO)
endif()
#
@@ -39,13 +39,13 @@ endif()
#
check_include_file(unistd.h HAVE_UNISTD_H)
if(HAVE_UNISTD_H)
add_definitions(-DHAVE_UNISTD_H)
add_definitions(-DHAVE_UNISTD_H)
endif()
if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
endif()
add_definitions(-DHAVE_CONFIG_H)
@@ -56,152 +56,152 @@ add_definitions(-DLZMA_API_STATIC)
#============================================================================
set(LZMA_PUBLIC_HDRS
api/lzma.h
api/lzma/base.h
api/lzma/bcj.h
api/lzma/block.h
api/lzma/check.h
api/lzma/container.h
api/lzma/delta.h
api/lzma/filter.h
api/lzma/hardware.h
api/lzma/index.h
api/lzma/index_hash.h
api/lzma/lzma12.h
api/lzma/stream_flags.h
api/lzma/version.h
api/lzma/vli.h
api/lzma.h
api/lzma/base.h
api/lzma/bcj.h
api/lzma/block.h
api/lzma/check.h
api/lzma/container.h
api/lzma/delta.h
api/lzma/filter.h
api/lzma/hardware.h
api/lzma/index.h
api/lzma/index_hash.h
api/lzma/lzma12.h
api/lzma/stream_flags.h
api/lzma/version.h
api/lzma/vli.h
)
set(LZMA_SRCS
check/check.c
check/check.h
check/crc32_fast.c
check/crc32_table_be.h
check/crc32_table.c
check/crc32_table_le.h
check/crc64_fast.c
check/crc64_table_be.h
check/crc64_table.c
check/crc64_table_le.h
check/crc_macros.h
check/sha256.c
common/alone_decoder.c
common/alone_decoder.h
common/alone_encoder.c
common/auto_decoder.c
common/block_buffer_decoder.c
common/block_buffer_encoder.c
common/block_buffer_encoder.h
common/block_decoder.c
common/block_decoder.h
common/block_encoder.c
common/block_encoder.h
common/block_header_decoder.c
common/block_header_encoder.c
common/block_util.c
common/common.c
common/common.h
common/easy_buffer_encoder.c
common/easy_decoder_memusage.c
common/easy_encoder.c
common/easy_encoder_memusage.c
common/easy_preset.c
common/easy_preset.h
common/filter_buffer_decoder.c
common/filter_buffer_encoder.c
common/filter_common.c
common/filter_common.h
common/filter_decoder.c
common/filter_decoder.h
common/filter_encoder.c
common/filter_encoder.h
common/filter_flags_decoder.c
common/filter_flags_encoder.c
common/hardware_cputhreads.c
common/hardware_physmem.c
common/index.c
common/index_decoder.c
common/index_encoder.c
common/index_encoder.h
common/index.h
common/index_hash.c
common/memcmplen.h
common/outqueue.c
common/outqueue.h
common/stream_buffer_decoder.c
common/stream_buffer_encoder.c
common/stream_decoder.c
common/stream_decoder.h
common/stream_encoder.c
common/stream_encoder_mt.c
common/stream_flags_common.c
common/stream_flags_common.h
common/stream_flags_decoder.c
common/stream_flags_encoder.c
common/vli_decoder.c
common/vli_encoder.c
common/vli_size.c
delta/delta_common.c
delta/delta_common.h
delta/delta_decoder.c
delta/delta_decoder.h
delta/delta_encoder.c
delta/delta_encoder.h
delta/delta_private.h
lz/lz_decoder.c
lz/lz_decoder.h
lz/lz_encoder.c
lz/lz_encoder.h
lz/lz_encoder_hash.h
lz/lz_encoder_hash_table.h
lz/lz_encoder_mf.c
lzma/fastpos.h
lzma/fastpos_table.c
lzma/lzma2_decoder.c
lzma/lzma2_decoder.h
lzma/lzma2_encoder.c
lzma/lzma2_encoder.h
lzma/lzma_common.h
lzma/lzma_decoder.c
lzma/lzma_decoder.h
lzma/lzma_encoder.c
lzma/lzma_encoder.h
lzma/lzma_encoder_optimum_fast.c
lzma/lzma_encoder_optimum_normal.c
lzma/lzma_encoder_presets.c
lzma/lzma_encoder_private.h
rangecoder/price.h
rangecoder/price_table.c
rangecoder/range_common.h
rangecoder/range_decoder.h
rangecoder/range_encoder.h
simple/simple_coder.c
simple/simple_coder.h
simple/simple_decoder.c
simple/simple_decoder.h
simple/simple_encoder.c
simple/simple_encoder.h
simple/simple_private.h
tuklib/mythread.h
tuklib/sysdefs.h
tuklib/tuklib_common.h
tuklib/tuklib_config.h
tuklib/tuklib_cpucores.c
tuklib/tuklib_cpucores.h
tuklib/tuklib_exit.c
tuklib/tuklib_exit.h
tuklib/tuklib_gettext.h
tuklib/tuklib_integer.h
tuklib/tuklib_mbstr_fw.c
tuklib/tuklib_mbstr.h
tuklib/tuklib_mbstr_width.c
tuklib/tuklib_open_stdxxx.c
tuklib/tuklib_open_stdxxx.h
tuklib/tuklib_physmem.c
tuklib/tuklib_physmem.h
tuklib/tuklib_progname.c
tuklib/tuklib_progname.h
check/check.c
check/check.h
check/crc32_fast.c
check/crc32_table_be.h
check/crc32_table.c
check/crc32_table_le.h
check/crc64_fast.c
check/crc64_table_be.h
check/crc64_table.c
check/crc64_table_le.h
check/crc_macros.h
check/sha256.c
common/alone_decoder.c
common/alone_decoder.h
common/alone_encoder.c
common/auto_decoder.c
common/block_buffer_decoder.c
common/block_buffer_encoder.c
common/block_buffer_encoder.h
common/block_decoder.c
common/block_decoder.h
common/block_encoder.c
common/block_encoder.h
common/block_header_decoder.c
common/block_header_encoder.c
common/block_util.c
common/common.c
common/common.h
common/easy_buffer_encoder.c
common/easy_decoder_memusage.c
common/easy_encoder.c
common/easy_encoder_memusage.c
common/easy_preset.c
common/easy_preset.h
common/filter_buffer_decoder.c
common/filter_buffer_encoder.c
common/filter_common.c
common/filter_common.h
common/filter_decoder.c
common/filter_decoder.h
common/filter_encoder.c
common/filter_encoder.h
common/filter_flags_decoder.c
common/filter_flags_encoder.c
common/hardware_cputhreads.c
common/hardware_physmem.c
common/index.c
common/index_decoder.c
common/index_encoder.c
common/index_encoder.h
common/index.h
common/index_hash.c
common/memcmplen.h
common/outqueue.c
common/outqueue.h
common/stream_buffer_decoder.c
common/stream_buffer_encoder.c
common/stream_decoder.c
common/stream_decoder.h
common/stream_encoder.c
common/stream_encoder_mt.c
common/stream_flags_common.c
common/stream_flags_common.h
common/stream_flags_decoder.c
common/stream_flags_encoder.c
common/vli_decoder.c
common/vli_encoder.c
common/vli_size.c
delta/delta_common.c
delta/delta_common.h
delta/delta_decoder.c
delta/delta_decoder.h
delta/delta_encoder.c
delta/delta_encoder.h
delta/delta_private.h
lz/lz_decoder.c
lz/lz_decoder.h
lz/lz_encoder.c
lz/lz_encoder.h
lz/lz_encoder_hash.h
lz/lz_encoder_hash_table.h
lz/lz_encoder_mf.c
lzma/fastpos.h
lzma/fastpos_table.c
lzma/lzma2_decoder.c
lzma/lzma2_decoder.h
lzma/lzma2_encoder.c
lzma/lzma2_encoder.h
lzma/lzma_common.h
lzma/lzma_decoder.c
lzma/lzma_decoder.h
lzma/lzma_encoder.c
lzma/lzma_encoder.h
lzma/lzma_encoder_optimum_fast.c
lzma/lzma_encoder_optimum_normal.c
lzma/lzma_encoder_presets.c
lzma/lzma_encoder_private.h
rangecoder/price.h
rangecoder/price_table.c
rangecoder/range_common.h
rangecoder/range_decoder.h
rangecoder/range_encoder.h
simple/simple_coder.c
simple/simple_coder.h
simple/simple_decoder.c
simple/simple_decoder.h
simple/simple_encoder.c
simple/simple_encoder.h
simple/simple_private.h
tuklib/mythread.h
tuklib/sysdefs.h
tuklib/tuklib_common.h
tuklib/tuklib_config.h
tuklib/tuklib_cpucores.c
tuklib/tuklib_cpucores.h
tuklib/tuklib_exit.c
tuklib/tuklib_exit.h
tuklib/tuklib_gettext.h
tuklib/tuklib_integer.h
tuklib/tuklib_mbstr_fw.c
tuklib/tuklib_mbstr.h
tuklib/tuklib_mbstr_width.c
tuklib/tuklib_open_stdxxx.c
tuklib/tuklib_open_stdxxx.h
tuklib/tuklib_physmem.c
tuklib/tuklib_physmem.h
tuklib/tuklib_progname.c
tuklib/tuklib_progname.h
)
add_library(lzma STATIC ${LZMA_SRCS} ${LZMA_PUBLIC_HDRS})
@@ -211,9 +211,9 @@ dolphin_disable_warnings(lzma)
target_compile_definitions(lzma PUBLIC LZMA_API_STATIC)
target_include_directories(lzma
PUBLIC
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/api
PRIVATE
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/
${CMAKE_CURRENT_SOURCE_DIR}/check
${CMAKE_CURRENT_SOURCE_DIR}/common

View File

@@ -1,86 +1,86 @@
add_library(usb STATIC EXCLUDE_FROM_ALL
libusb/libusb/core.c
libusb/libusb/descriptor.c
libusb/libusb/hotplug.c
libusb/libusb/io.c
libusb/libusb/strerror.c
libusb/libusb/sync.c
libusb/libusb/core.c
libusb/libusb/descriptor.c
libusb/libusb/hotplug.c
libusb/libusb/io.c
libusb/libusb/strerror.c
libusb/libusb/sync.c
)
dolphin_disable_warnings(usb)
set_target_properties(usb PROPERTIES VERSION 1.0.26)
if(WIN32)
target_include_directories(usb BEFORE PUBLIC libusb/libusb PRIVATE libusb/msvc)
target_include_directories(usb BEFORE PUBLIC libusb/libusb PRIVATE libusb/msvc)
else()
target_include_directories(usb
# turns out other projects also have "config.h", so make sure the
# LibUSB one comes first
BEFORE
# turns out other projects also have "config.h", so make sure the
# LibUSB one comes first
BEFORE
PUBLIC libusb/libusb
PRIVATE "${CMAKE_CURRENT_BINARY_DIR}"
PUBLIC libusb/libusb
PRIVATE "${CMAKE_CURRENT_BINARY_DIR}"
)
endif()
if(WIN32 OR CYGWIN)
target_sources(usb PRIVATE
libusb/libusb/os/threads_windows.c
libusb/libusb/os/windows_common.c
libusb/libusb/os/windows_usbdk.c
libusb/libusb/os/windows_winusb.c
libusb/libusb/os/events_windows.c
)
set(PLATFORM_WINDOWS TRUE)
target_sources(usb PRIVATE
libusb/libusb/os/threads_windows.c
libusb/libusb/os/windows_common.c
libusb/libusb/os/windows_usbdk.c
libusb/libusb/os/windows_winusb.c
libusb/libusb/os/events_windows.c
)
set(PLATFORM_WINDOWS TRUE)
elseif(APPLE)
target_sources(usb PRIVATE libusb/libusb/os/darwin_usb.c)
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
find_library(IOKIT_LIBRARY IOKit)
find_library(OBJC_LIBRARY objc)
find_library(SECURITY_LIBRARY Security)
target_link_libraries(usb PRIVATE
${COREFOUNDATION_LIBRARY}
${IOKIT_LIBRARY}
${OBJC_LIBRARY}
${SECURITY_LIBRARY}
)
target_sources(usb PRIVATE libusb/libusb/os/darwin_usb.c)
find_library(COREFOUNDATION_LIBRARY CoreFoundation)
find_library(IOKIT_LIBRARY IOKit)
find_library(OBJC_LIBRARY objc)
find_library(SECURITY_LIBRARY Security)
target_link_libraries(usb PRIVATE
${COREFOUNDATION_LIBRARY}
${IOKIT_LIBRARY}
${OBJC_LIBRARY}
${SECURITY_LIBRARY}
)
# # Dolphin on Android doesn't use libusb.
#elseif(ANDROID)
# target_sources(usb PRIVATE
# libusb/libusb/os/linux_usbfs.c
# libusb/libusb/os/linux_netlink.c
# )
# find_library(LOG_LIBRARY log)
# target_link_libraries(usb PRIVATE ${LOG_LIBRARY})
# target_sources(usb PRIVATE
# libusb/libusb/os/linux_usbfs.c
# libusb/libusb/os/linux_netlink.c
# )
# find_library(LOG_LIBRARY log)
# target_link_libraries(usb PRIVATE ${LOG_LIBRARY})
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
target_sources(usb PRIVATE libusb/libusb/os/linux_usbfs.c)
find_package(LIBUDEV)
if(LIBUDEV_FOUND)
target_sources(usb PRIVATE libusb/libusb/os/linux_udev.c)
target_link_libraries(usb PRIVATE "${LIBUDEV_LIBRARIES}")
target_include_directories(usb PRIVATE "${LIBUDEV_INCLUDE_DIR}")
set(HAVE_LIBUDEV TRUE)
else()
target_sources(usb PRIVATE libusb/libusb/os/linux_netlink.c)
endif()
target_sources(usb PRIVATE libusb/libusb/os/linux_usbfs.c)
find_package(LIBUDEV)
if(LIBUDEV_FOUND)
target_sources(usb PRIVATE libusb/libusb/os/linux_udev.c)
target_link_libraries(usb PRIVATE "${LIBUDEV_LIBRARIES}")
target_include_directories(usb PRIVATE "${LIBUDEV_INCLUDE_DIR}")
set(HAVE_LIBUDEV TRUE)
else()
target_sources(usb PRIVATE libusb/libusb/os/linux_netlink.c)
endif()
elseif(${CMAKE_SYSTEM_NAME} MATCHES "NetBSD")
target_sources(usb PRIVATE libusb/libusb/os/netbsd_usb.c)
target_sources(usb PRIVATE libusb/libusb/os/netbsd_usb.c)
elseif(${CMAKE_SYSTEM_NAME} MATCHES "OpenBSD")
target_sources(usb PRIVATE libusb/libusb/os/openbsd_usb.c)
target_sources(usb PRIVATE libusb/libusb/os/openbsd_usb.c)
endif()
if(UNIX)
target_sources(usb PRIVATE
libusb/libusb/os/events_posix.c
libusb/libusb/os/threads_posix.c
)
find_package(Threads REQUIRED)
if(THREADS_HAVE_PTHREAD_ARG)
target_compile_options(usb PUBLIC "-pthread")
endif()
if(CMAKE_THREAD_LIBS_INIT)
target_link_libraries(usb PRIVATE "${CMAKE_THREAD_LIBS_INIT}")
endif()
set(PLATFORM_POSIX TRUE)
target_sources(usb PRIVATE
libusb/libusb/os/events_posix.c
libusb/libusb/os/threads_posix.c
)
find_package(Threads REQUIRED)
if(THREADS_HAVE_PTHREAD_ARG)
target_compile_options(usb PUBLIC "-pthread")
endif()
if(CMAKE_THREAD_LIBS_INIT)
target_link_libraries(usb PRIVATE "${CMAKE_THREAD_LIBS_INIT}")
endif()
set(PLATFORM_POSIX TRUE)
endif()
# Create config.h

View File

@@ -1,4 +1,4 @@
add_library(RangeSet::RangeSet INTERFACE IMPORTED GLOBAL)
set_target_properties(RangeSet::RangeSet PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_LIST_DIR}/include
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_LIST_DIR}/include
)

View File

@@ -1,61 +1,61 @@
add_library(rcheevos
rcheevos/include/rc_api_editor.h
rcheevos/include/rc_api_info.h
rcheevos/include/rc_api_request.h
rcheevos/include/rc_api_runtime.h
rcheevos/include/rc_api_user.h
rcheevos/include/rc_client.h
rcheevos/include/rc_client_raintegration.h
rcheevos/include/rc_consoles.h
rcheevos/include/rc_error.h
rcheevos/include/rc_export.h
rcheevos/include/rc_hash.h
rcheevos/include/rcheevos.h
rcheevos/include/rc_runtime.h
rcheevos/include/rc_runtime_types.h
rcheevos/include/rc_util.h
rcheevos/src/rapi/rc_api_common.c
rcheevos/src/rapi/rc_api_common.h
rcheevos/src/rapi/rc_api_editor.c
rcheevos/src/rapi/rc_api_info.c
rcheevos/src/rapi/rc_api_runtime.c
rcheevos/src/rapi/rc_api_user.c
rcheevos/src/rcheevos/alloc.c
rcheevos/src/rcheevos/condition.c
rcheevos/src/rcheevos/condset.c
rcheevos/src/rcheevos/consoleinfo.c
rcheevos/src/rcheevos/format.c
rcheevos/src/rcheevos/lboard.c
rcheevos/src/rcheevos/memref.c
rcheevos/src/rcheevos/operand.c
rcheevos/src/rcheevos/rc_internal.h
rcheevos/src/rcheevos/rc_validate.c
rcheevos/src/rcheevos/rc_validate.h
rcheevos/src/rcheevos/richpresence.c
rcheevos/src/rcheevos/runtime.c
rcheevos/src/rcheevos/runtime_progress.c
rcheevos/src/rcheevos/trigger.c
rcheevos/src/rcheevos/value.c
rcheevos/src/rhash/aes.c
rcheevos/src/rhash/aes.h
rcheevos/src/rhash/cdreader.c
rcheevos/src/rhash/hash.c
rcheevos/src/rhash/hash_disc.c
rcheevos/src/rhash/md5.c
rcheevos/src/rhash/md5.h
rcheevos/src/rhash/rc_hash_internal.h
rcheevos/src/rc_client.c
rcheevos/src/rc_client_external.c
rcheevos/src/rc_client_external.h
rcheevos/src/rc_client_external_versions.h
rcheevos/src/rc_client_internal.h
rcheevos/src/rc_client_raintegration.c
rcheevos/src/rc_client_raintegration_internal.h
rcheevos/src/rc_compat.c
rcheevos/src/rc_compat.h
rcheevos/src/rc_util.c
rcheevos/src/rc_version.c
rcheevos/src/rc_version.h
rcheevos/include/rc_api_editor.h
rcheevos/include/rc_api_info.h
rcheevos/include/rc_api_request.h
rcheevos/include/rc_api_runtime.h
rcheevos/include/rc_api_user.h
rcheevos/include/rc_client.h
rcheevos/include/rc_client_raintegration.h
rcheevos/include/rc_consoles.h
rcheevos/include/rc_error.h
rcheevos/include/rc_export.h
rcheevos/include/rc_hash.h
rcheevos/include/rcheevos.h
rcheevos/include/rc_runtime.h
rcheevos/include/rc_runtime_types.h
rcheevos/include/rc_util.h
rcheevos/src/rapi/rc_api_common.c
rcheevos/src/rapi/rc_api_common.h
rcheevos/src/rapi/rc_api_editor.c
rcheevos/src/rapi/rc_api_info.c
rcheevos/src/rapi/rc_api_runtime.c
rcheevos/src/rapi/rc_api_user.c
rcheevos/src/rcheevos/alloc.c
rcheevos/src/rcheevos/condition.c
rcheevos/src/rcheevos/condset.c
rcheevos/src/rcheevos/consoleinfo.c
rcheevos/src/rcheevos/format.c
rcheevos/src/rcheevos/lboard.c
rcheevos/src/rcheevos/memref.c
rcheevos/src/rcheevos/operand.c
rcheevos/src/rcheevos/rc_internal.h
rcheevos/src/rcheevos/rc_validate.c
rcheevos/src/rcheevos/rc_validate.h
rcheevos/src/rcheevos/richpresence.c
rcheevos/src/rcheevos/runtime.c
rcheevos/src/rcheevos/runtime_progress.c
rcheevos/src/rcheevos/trigger.c
rcheevos/src/rcheevos/value.c
rcheevos/src/rhash/aes.c
rcheevos/src/rhash/aes.h
rcheevos/src/rhash/cdreader.c
rcheevos/src/rhash/hash.c
rcheevos/src/rhash/hash_disc.c
rcheevos/src/rhash/md5.c
rcheevos/src/rhash/md5.h
rcheevos/src/rhash/rc_hash_internal.h
rcheevos/src/rc_client.c
rcheevos/src/rc_client_external.c
rcheevos/src/rc_client_external.h
rcheevos/src/rc_client_external_versions.h
rcheevos/src/rc_client_internal.h
rcheevos/src/rc_client_raintegration.c
rcheevos/src/rc_client_raintegration_internal.h
rcheevos/src/rc_compat.c
rcheevos/src/rc_compat.h
rcheevos/src/rc_util.c
rcheevos/src/rc_version.c
rcheevos/src/rc_version.h
)
dolphin_disable_warnings(rcheevos)
@@ -69,5 +69,5 @@ target_compile_definitions(rcheevos PRIVATE "RC_HASH_NO_ROM")
target_compile_definitions(rcheevos PRIVATE "RC_HASH_NO_ZIP")
if(CMAKE_SYSTEM_NAME MATCHES "Windows")
target_compile_definitions(rcheevos PRIVATE "RC_CLIENT_SUPPORTS_RAINTEGRATION")
target_compile_definitions(rcheevos PRIVATE "_CRT_SECURE_NO_WARNINGS")
target_compile_definitions(rcheevos PRIVATE "_CRT_SECURE_NO_WARNINGS")
endif()

View File

@@ -1,32 +1,32 @@
set(SRCS
SPIRV-Cross/GLSL.std.450.h
SPIRV-Cross/spirv.h
SPIRV-Cross/spirv.hpp
SPIRV-Cross/spirv_cfg.cpp
SPIRV-Cross/spirv_cfg.hpp
SPIRV-Cross/spirv_common.hpp
SPIRV-Cross/spirv_cpp.cpp
SPIRV-Cross/spirv_cpp.hpp
SPIRV-Cross/spirv_cross.cpp
SPIRV-Cross/spirv_cross.hpp
SPIRV-Cross/spirv_cross_c.cpp
SPIRV-Cross/spirv_cross_c.h
SPIRV-Cross/spirv_cross_containers.hpp
SPIRV-Cross/spirv_cross_error_handling.hpp
SPIRV-Cross/spirv_cross_parsed_ir.cpp
SPIRV-Cross/spirv_cross_parsed_ir.hpp
SPIRV-Cross/spirv_cross_util.cpp
SPIRV-Cross/spirv_cross_util.hpp
SPIRV-Cross/spirv_glsl.cpp
SPIRV-Cross/spirv_glsl.hpp
SPIRV-Cross/spirv_hlsl.cpp
SPIRV-Cross/spirv_hlsl.hpp
SPIRV-Cross/spirv_msl.cpp
SPIRV-Cross/spirv_msl.hpp
SPIRV-Cross/spirv_parser.cpp
SPIRV-Cross/spirv_parser.hpp
SPIRV-Cross/spirv_reflect.cpp
SPIRV-Cross/spirv_reflect.hpp
SPIRV-Cross/GLSL.std.450.h
SPIRV-Cross/spirv.h
SPIRV-Cross/spirv.hpp
SPIRV-Cross/spirv_cfg.cpp
SPIRV-Cross/spirv_cfg.hpp
SPIRV-Cross/spirv_common.hpp
SPIRV-Cross/spirv_cpp.cpp
SPIRV-Cross/spirv_cpp.hpp
SPIRV-Cross/spirv_cross.cpp
SPIRV-Cross/spirv_cross.hpp
SPIRV-Cross/spirv_cross_c.cpp
SPIRV-Cross/spirv_cross_c.h
SPIRV-Cross/spirv_cross_containers.hpp
SPIRV-Cross/spirv_cross_error_handling.hpp
SPIRV-Cross/spirv_cross_parsed_ir.cpp
SPIRV-Cross/spirv_cross_parsed_ir.hpp
SPIRV-Cross/spirv_cross_util.cpp
SPIRV-Cross/spirv_cross_util.hpp
SPIRV-Cross/spirv_glsl.cpp
SPIRV-Cross/spirv_glsl.hpp
SPIRV-Cross/spirv_hlsl.cpp
SPIRV-Cross/spirv_hlsl.hpp
SPIRV-Cross/spirv_msl.cpp
SPIRV-Cross/spirv_msl.hpp
SPIRV-Cross/spirv_parser.cpp
SPIRV-Cross/spirv_parser.hpp
SPIRV-Cross/spirv_reflect.cpp
SPIRV-Cross/spirv_reflect.hpp
)
if(NOT MSVC)
@@ -40,9 +40,9 @@ add_compile_options(-Wno-sign-compare)
add_compile_options(-Wno-parentheses)
add_compile_options(-Wno-unused-variable)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
add_compile_options(-Wno-unused-but-set-variable)
add_compile_options(-Wno-unused-but-set-variable)
elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options(-Wno-missing-variable-declarations)
add_compile_options(-Wno-missing-variable-declarations)
endif()
endif()

View File

@@ -3,7 +3,7 @@ target_compile_definitions(tinygltf PUBLIC TINYGLTF_NOEXCEPTION)
target_compile_definitions(tinygltf PUBLIC TINYGLTF_NO_EXTERNAL_IMAGE)
target_compile_definitions(tinygltf PUBLIC TINYGLTF_USE_CPP14)
if (NOT MSVC)
target_compile_features(tinygltf PRIVATE cxx_std_20)
target_compile_features(tinygltf PRIVATE cxx_std_20)
endif()
target_sources(tinygltf PRIVATE
tinygltf/tiny_gltf.cc)

View File

@@ -1,4 +1,4 @@
add_library(watcher INTERFACE IMPORTED GLOBAL)
set_target_properties(watcher PROPERTIES
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_LIST_DIR}/watcher/include
INTERFACE_INCLUDE_DIRECTORIES ${CMAKE_CURRENT_LIST_DIR}/watcher/include
)