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,17 +1,17 @@
find_program(CCACHE_BIN NAMES ccache sccache) find_program(CCACHE_BIN NAMES ccache sccache)
if(CCACHE_BIN) if(CCACHE_BIN)
# Official ccache recommendation is to set CMAKE_C(XX)_COMPILER_LAUNCHER # Official ccache recommendation is to set CMAKE_C(XX)_COMPILER_LAUNCHER
if (NOT CMAKE_C_COMPILER_LAUNCHER MATCHES "ccache") if (NOT CMAKE_C_COMPILER_LAUNCHER MATCHES "ccache")
list(INSERT CMAKE_C_COMPILER_LAUNCHER 0 "${CCACHE_BIN}") list(INSERT CMAKE_C_COMPILER_LAUNCHER 0 "${CCACHE_BIN}")
endif() endif()
if (NOT CMAKE_CXX_COMPILER_LAUNCHER MATCHES "ccache") if (NOT CMAKE_CXX_COMPILER_LAUNCHER MATCHES "ccache")
list(INSERT CMAKE_CXX_COMPILER_LAUNCHER 0 "${CCACHE_BIN}") list(INSERT CMAKE_CXX_COMPILER_LAUNCHER 0 "${CCACHE_BIN}")
endif() endif()
# ccache uses -I when compiling without preprocessor, which makes clang complain. # ccache uses -I when compiling without preprocessor, which makes clang complain.
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments -fcolor-diagnostics") set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Qunused-arguments -fcolor-diagnostics")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Qunused-arguments -fcolor-diagnostics")
endif() endif()
endif() endif()

View File

@@ -1,58 +1,58 @@
find_package(PkgConfig) find_package(PkgConfig)
macro(_internal_message msg) macro(_internal_message msg)
if(NOT ${_is_quiet}) if(NOT ${_is_quiet})
message(STATUS "${msg}") message(STATUS "${msg}")
endif() endif()
endmacro() endmacro()
macro(check_lib var pc lib) macro(check_lib var pc lib)
set(_is_required 0) set(_is_required 0)
set(_is_quiet 0) set(_is_quiet 0)
set(_arg_list ${ARGN}) set(_arg_list ${ARGN})
foreach(_arg ${ARGN}) foreach(_arg ${ARGN})
if(_arg STREQUAL "REQUIRED") if(_arg STREQUAL "REQUIRED")
list(REMOVE_ITEM _arg_list "REQUIRED") list(REMOVE_ITEM _arg_list "REQUIRED")
set(_is_required 1) set(_is_required 1)
endif() endif()
if(_arg STREQUAL "QUIET") if(_arg STREQUAL "QUIET")
list(REMOVE_ITEM _arg_list "QUIET") list(REMOVE_ITEM _arg_list "QUIET")
set(_is_quiet 1) set(_is_quiet 1)
endif() endif()
endforeach() endforeach()
if(PKG_CONFIG_FOUND AND NOT ${var}_FOUND) if(PKG_CONFIG_FOUND AND NOT ${var}_FOUND)
pkg_search_module(${var} QUIET ${pc}) pkg_search_module(${var} QUIET ${pc})
endif() endif()
if(${var}_FOUND) if(${var}_FOUND)
if(${var}_INCLUDE_DIRS) if(${var}_INCLUDE_DIRS)
include_directories(${${var}_INCLUDE_DIRS}) include_directories(${${var}_INCLUDE_DIRS})
endif() endif()
# Make sure include directories for headers found using find_path below # Make sure include directories for headers found using find_path below
# are re-added when reconfiguring # are re-added when reconfiguring
if(${var}_INCLUDE) if(${var}_INCLUDE)
include_directories(${${var}_INCLUDE}) include_directories(${${var}_INCLUDE})
endif() endif()
_internal_message("${lib} found") _internal_message("${lib} found")
else() else()
find_library(${var} ${lib}) find_library(${var} ${lib})
if(_arg_list) if(_arg_list)
find_path(${var}_INCLUDE ${_arg_list}) find_path(${var}_INCLUDE ${_arg_list})
else() else()
set(${var}_INCLUDE FALSE) set(${var}_INCLUDE FALSE)
endif() endif()
if(${var} AND ${var}_INCLUDE) if(${var} AND ${var}_INCLUDE)
include_directories(${${var}_INCLUDE}) include_directories(${${var}_INCLUDE})
_internal_message("${lib} found") _internal_message("${lib} found")
set(${var}_FOUND 1 CACHE INTERNAL "") set(${var}_FOUND 1 CACHE INTERNAL "")
else() else()
if(_is_required) if(_is_required)
message(FATAL_ERROR "${lib} is required but not found") message(FATAL_ERROR "${lib} is required but not found")
else() else()
_internal_message("${lib} not found") _internal_message("${lib} not found")
endif() endif()
endif() endif()
endif() endif()
endmacro() endmacro()

View File

@@ -10,15 +10,15 @@
# module as a post-build step. # module as a post-build step.
if(CMAKE_GENERATOR) if(CMAKE_GENERATOR)
# Being called as include(DolphinPostprocessBundle), so define a helper function. # Being called as include(DolphinPostprocessBundle), so define a helper function.
set(_DOLPHIN_POSTPROCESS_BUNDLE_MODULE_LOCATION "${CMAKE_CURRENT_LIST_FILE}") set(_DOLPHIN_POSTPROCESS_BUNDLE_MODULE_LOCATION "${CMAKE_CURRENT_LIST_FILE}")
function(dolphin_postprocess_bundle target) function(dolphin_postprocess_bundle target)
add_custom_command(TARGET ${target} POST_BUILD add_custom_command(TARGET ${target} POST_BUILD
COMMAND ${CMAKE_COMMAND} "-D" "DOLPHIN_BUNDLE_PATH=$<TARGET_BUNDLE_DIR:${target}>" COMMAND ${CMAKE_COMMAND} "-D" "DOLPHIN_BUNDLE_PATH=$<TARGET_BUNDLE_DIR:${target}>"
-P "${_DOLPHIN_POSTPROCESS_BUNDLE_MODULE_LOCATION}" -P "${_DOLPHIN_POSTPROCESS_BUNDLE_MODULE_LOCATION}"
) )
endfunction() endfunction()
return() return()
endif() endif()
message(STATUS "Fixing up application bundle: ${DOLPHIN_BUNDLE_PATH}") message(STATUS "Fixing up application bundle: ${DOLPHIN_BUNDLE_PATH}")
@@ -35,9 +35,9 @@ set(extra_dirs "/usr/local/lib" "/lib" "/usr/lib")
# BundleUtilities is overly verbose, so disable most of its messages # BundleUtilities is overly verbose, so disable most of its messages
function(message) function(message)
if(NOT ARGV MATCHES "^STATUS;") if(NOT ARGV MATCHES "^STATUS;")
_message(${ARGV}) _message(${ARGV})
endif() endif()
endfunction() endfunction()
include(BundleUtilities) include(BundleUtilities)

View File

@@ -4,7 +4,7 @@ mark_as_advanced(CUBEB_INCLUDE_DIR CUBEB_LIBRARY)
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(CUBEB DEFAULT_MSG find_package_handle_standard_args(CUBEB DEFAULT_MSG
CUBEB_INCLUDE_DIR CUBEB_LIBRARY) CUBEB_INCLUDE_DIR CUBEB_LIBRARY)
if(CUBEB_FOUND AND NOT TARGET cubeb::cubeb) if(CUBEB_FOUND AND NOT TARGET cubeb::cubeb)
add_library(cubeb::cubeb UNKNOWN IMPORTED) add_library(cubeb::cubeb UNKNOWN IMPORTED)

View File

@@ -36,16 +36,16 @@ find_package(PkgConfig)
pkg_check_modules(PC_EGL egl) pkg_check_modules(PC_EGL egl)
if (PC_EGL_FOUND) if (PC_EGL_FOUND)
set(EGL_DEFINITIONS ${PC_EGL_CFLAGS_OTHER}) set(EGL_DEFINITIONS ${PC_EGL_CFLAGS_OTHER})
endif () endif ()
find_path(EGL_INCLUDE_DIRS NAMES EGL/egl.h find_path(EGL_INCLUDE_DIRS NAMES EGL/egl.h
HINTS ${PC_EGL_INCLUDEDIR} ${PC_EGL_INCLUDE_DIRS} HINTS ${PC_EGL_INCLUDEDIR} ${PC_EGL_INCLUDE_DIRS}
) )
set(EGL_NAMES ${EGL_NAMES} egl EGL) set(EGL_NAMES ${EGL_NAMES} egl EGL)
find_library(EGL_LIBRARIES NAMES ${EGL_NAMES} find_library(EGL_LIBRARIES NAMES ${EGL_NAMES}
HINTS ${PC_EGL_LIBDIR} ${PC_EGL_LIBRARY_DIRS} HINTS ${PC_EGL_LIBDIR} ${PC_EGL_LIBRARY_DIRS}
) )
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)

View File

@@ -7,11 +7,11 @@ include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(HIDAPI DEFAULT_MSG HIDAPI_LIBRARY HIDAPI_INCLUDE_DIR) find_package_handle_standard_args(HIDAPI DEFAULT_MSG HIDAPI_LIBRARY HIDAPI_INCLUDE_DIR)
if(HIDAPI_FOUND AND NOT TARGET Hidapi::Hidapi) if(HIDAPI_FOUND AND NOT TARGET Hidapi::Hidapi)
add_library(Hidapi::Hidapi UNKNOWN IMPORTED) add_library(Hidapi::Hidapi UNKNOWN IMPORTED)
set_target_properties(Hidapi::Hidapi PROPERTIES set_target_properties(Hidapi::Hidapi PROPERTIES
IMPORTED_LOCATION ${HIDAPI_LIBRARIES} IMPORTED_LOCATION ${HIDAPI_LIBRARIES}
INTERFACE_INCLUDE_DIRECTORIES ${HIDAPI_INCLUDE_DIRS} INTERFACE_INCLUDE_DIRECTORIES ${HIDAPI_INCLUDE_DIRS}
) )
endif() endif()
mark_as_advanced(HIDAPI_INCLUDE_DIR HIDAPI_LIBRARY) mark_as_advanced(HIDAPI_INCLUDE_DIR HIDAPI_LIBRARY)

View File

@@ -8,19 +8,19 @@ find_package(PkgConfig)
pkg_check_modules(PC_LIBEVDEV QUIET libevdev) pkg_check_modules(PC_LIBEVDEV QUIET libevdev)
FIND_PATH( FIND_PATH(
LIBEVDEV_INCLUDE_DIR libevdev/libevdev.h LIBEVDEV_INCLUDE_DIR libevdev/libevdev.h
HINTS ${PC_LIBEVDEV_INCLUDEDIR} ${PC_LIBEVDEV_INCLUDE_DIRS} HINTS ${PC_LIBEVDEV_INCLUDEDIR} ${PC_LIBEVDEV_INCLUDE_DIRS}
/usr/include /usr/include
/usr/local/include /usr/local/include
${LIBEVDEV_PATH_INCLUDES} ${LIBEVDEV_PATH_INCLUDES}
) )
FIND_LIBRARY( FIND_LIBRARY(
LIBEVDEV_LIBRARY LIBEVDEV_LIBRARY
NAMES evdev libevdev NAMES evdev libevdev
HINTS ${PC_LIBEVDEV_LIBDIR} ${PC_LIBEVDEV_LIBRARY_DIRS} HINTS ${PC_LIBEVDEV_LIBDIR} ${PC_LIBEVDEV_LIBRARY_DIRS}
PATHS ${ADDITIONAL_LIBRARY_PATHS} PATHS ${ADDITIONAL_LIBRARY_PATHS}
${LIBEVDEV_PATH_LIB} ${LIBEVDEV_PATH_LIB}
) )
set(LIBEVDEV_LIBRARIES ${LIBEVDEV_LIBRARY} ) set(LIBEVDEV_LIBRARIES ${LIBEVDEV_LIBRARY} )

View File

@@ -4,7 +4,7 @@ mark_as_advanced(LIBMGBA_INCLUDE_DIR LIBMGBA_LIBRARY)
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LIBMGBA DEFAULT_MSG find_package_handle_standard_args(LIBMGBA DEFAULT_MSG
LIBMGBA_INCLUDE_DIR LIBMGBA_LIBRARY) LIBMGBA_INCLUDE_DIR LIBMGBA_LIBRARY)
if(LIBMGBA_FOUND AND NOT mGBA::mgba) if(LIBMGBA_FOUND AND NOT mGBA::mgba)
add_library(mGBA::mgba UNKNOWN IMPORTED) add_library(mGBA::mgba UNKNOWN IMPORTED)

View File

@@ -5,17 +5,17 @@
# LIBUDEV_LIBRARIES - The libraries needed to use LIBUDEV # LIBUDEV_LIBRARIES - The libraries needed to use LIBUDEV
FIND_PATH( FIND_PATH(
LIBUDEV_INCLUDE_DIR libudev.h LIBUDEV_INCLUDE_DIR libudev.h
/usr/include /usr/include
/usr/local/include /usr/local/include
${LIBUDEV_PATH_INCLUDES} ${LIBUDEV_PATH_INCLUDES}
) )
FIND_LIBRARY( FIND_LIBRARY(
LIBUDEV_LIBRARY LIBUDEV_LIBRARY
NAMES udev libudev NAMES udev libudev
PATHS ${ADDITIONAL_LIBRARY_PATHS} PATHS ${ADDITIONAL_LIBRARY_PATHS}
${LIBUDEV_PATH_LIB} ${LIBUDEV_PATH_LIB}
) )
set(LIBUDEV_LIBRARIES ${LIBUDEV_LIBRARY} ) set(LIBUDEV_LIBRARIES ${LIBUDEV_LIBRARY} )

View File

@@ -4,7 +4,7 @@ mark_as_advanced(LZO_INCLUDE_DIR LZO_LIBRARY)
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(LZO DEFAULT_MSG find_package_handle_standard_args(LZO DEFAULT_MSG
LZO_INCLUDE_DIR LZO_LIBRARY) LZO_INCLUDE_DIR LZO_LIBRARY)
if(LZO_FOUND AND NOT TARGET LZO::LZO) if(LZO_FOUND AND NOT TARGET LZO::LZO)
add_library(LZO::LZO UNKNOWN IMPORTED) add_library(LZO::LZO UNKNOWN IMPORTED)

View File

@@ -9,42 +9,42 @@
# vim: expandtab sw=4 ts=4 sts=4: # vim: expandtab sw=4 ts=4 sts=4:
if(ANDROID) if(ANDROID)
set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found") set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found")
message(STATUS "libusb-1.0 not found.") message(STATUS "libusb-1.0 not found.")
elseif (NOT LIBUSB_FOUND) elseif (NOT LIBUSB_FOUND)
pkg_check_modules (LIBUSB_PKG libusb-1.0) pkg_check_modules (LIBUSB_PKG libusb-1.0)
find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h find_path(LIBUSB_INCLUDE_DIR NAMES libusb.h
PATHS PATHS
${LIBUSB_PKG_INCLUDE_DIRS} ${LIBUSB_PKG_INCLUDE_DIRS}
/usr/include/libusb-1.0 /usr/include/libusb-1.0
/usr/include /usr/include
/usr/local/include/libusb-1.0 /usr/local/include/libusb-1.0
/usr/local/include /usr/local/include
) )
find_library(LIBUSB_LIBRARIES NAMES usb-1.0 usb find_library(LIBUSB_LIBRARIES NAMES usb-1.0 usb
PATHS PATHS
${LIBUSB_PKG_LIBRARY_DIRS} ${LIBUSB_PKG_LIBRARY_DIRS}
/usr/lib /usr/lib
/usr/local/lib /usr/local/lib
) )
if(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) if(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
set(LIBUSB_FOUND TRUE CACHE INTERNAL "libusb-1.0 found") set(LIBUSB_FOUND TRUE CACHE INTERNAL "libusb-1.0 found")
message(STATUS "Found libusb-1.0: ${LIBUSB_INCLUDE_DIR}, ${LIBUSB_LIBRARIES}") message(STATUS "Found libusb-1.0: ${LIBUSB_INCLUDE_DIR}, ${LIBUSB_LIBRARIES}")
else(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) else(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found") set(LIBUSB_FOUND FALSE CACHE INTERNAL "libusb-1.0 found")
message(STATUS "libusb-1.0 not found.") message(STATUS "libusb-1.0 not found.")
endif(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES) endif(LIBUSB_INCLUDE_DIR AND LIBUSB_LIBRARIES)
mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES) mark_as_advanced(LIBUSB_INCLUDE_DIR LIBUSB_LIBRARIES)
endif () endif ()
if(LIBUSB_FOUND AND NOT TARGET LibUSB::LibUSB) if(LIBUSB_FOUND AND NOT TARGET LibUSB::LibUSB)
add_library(LibUSB::LibUSB UNKNOWN IMPORTED) add_library(LibUSB::LibUSB UNKNOWN IMPORTED)
set_target_properties(LibUSB::LibUSB PROPERTIES set_target_properties(LibUSB::LibUSB PROPERTIES
IMPORTED_LOCATION "${LIBUSB_LIBRARIES}" IMPORTED_LOCATION "${LIBUSB_LIBRARIES}"
INTERFACE_INCLUDE_DIRECTORIES "${LIBUSB_INCLUDE_DIR}" INTERFACE_INCLUDE_DIRECTORIES "${LIBUSB_INCLUDE_DIR}"
) )
endif() endif()

View File

@@ -8,52 +8,52 @@ set(MBEDTLS_INCLUDE_DIRS ${MBEDTLS_INCLUDE_DIR})
set(MBEDTLS_LIBRARIES ${MBEDTLS_LIBRARY} ${MBEDX509_LIBRARY} ${MBEDCRYPTO_LIBRARY}) set(MBEDTLS_LIBRARIES ${MBEDTLS_LIBRARY} ${MBEDX509_LIBRARY} ${MBEDCRYPTO_LIBRARY})
if(NOT MBEDTLS_INCLUDE_DIR STREQUAL "MBEDTLS_INCLUDE_DIR-NOTFOUND") if(NOT MBEDTLS_INCLUDE_DIR STREQUAL "MBEDTLS_INCLUDE_DIR-NOTFOUND")
if(EXISTS ${MBEDTLS_INCLUDE_DIR}/mbedtls/build_info.h) if(EXISTS ${MBEDTLS_INCLUDE_DIR}/mbedtls/build_info.h)
file(STRINGS ${MBEDTLS_INCLUDE_DIR}/mbedtls/build_info.h MBEDTLS_VERSION_STR REGEX "^#define[ \t]+MBEDTLS_VERSION_STRING[\t ].*") file(STRINGS ${MBEDTLS_INCLUDE_DIR}/mbedtls/build_info.h MBEDTLS_VERSION_STR REGEX "^#define[ \t]+MBEDTLS_VERSION_STRING[\t ].*")
else() else()
file(STRINGS ${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h MBEDTLS_VERSION_STR REGEX "^#define[ \t]+MBEDTLS_VERSION_STRING[\t ].*") file(STRINGS ${MBEDTLS_INCLUDE_DIR}/mbedtls/version.h MBEDTLS_VERSION_STR REGEX "^#define[ \t]+MBEDTLS_VERSION_STRING[\t ].*")
endif() endif()
string(REGEX REPLACE "^#define[\t ]+MBEDTLS_VERSION_STRING[\t ]+\"([.0-9]+)\".*" "\\1" MBEDTLS_VERSION ${MBEDTLS_VERSION_STR}) string(REGEX REPLACE "^#define[\t ]+MBEDTLS_VERSION_STRING[\t ]+\"([.0-9]+)\".*" "\\1" MBEDTLS_VERSION ${MBEDTLS_VERSION_STR})
endif() endif()
if(NOT MBEDTLS_INCLUDE_DIR STREQUAL "MBEDTLS_INCLUDE_DIR-NOTFOUND" AND MBEDTLS_VERSION VERSION_GREATER_EQUAL 3) if(NOT MBEDTLS_INCLUDE_DIR STREQUAL "MBEDTLS_INCLUDE_DIR-NOTFOUND" AND MBEDTLS_VERSION VERSION_GREATER_EQUAL 3)
# Once CMake 3.19 is required, we can enable HANDLE_VERSION_RANGE and use that # Once CMake 3.19 is required, we can enable HANDLE_VERSION_RANGE and use that
if(MBEDTLS_FIND_REQUIRED) if(MBEDTLS_FIND_REQUIRED)
set(type FATAL_ERROR) set(type FATAL_ERROR)
else() else()
set(type STATUS) set(type STATUS)
endif() endif()
if(MBEDTLS_FIND_REQUIRED OR NOT MBEDTLS_FIND_QUIETLY) if(MBEDTLS_FIND_REQUIRED OR NOT MBEDTLS_FIND_QUIETLY)
message(${type} "Could NOT find MBEDTLS: Found unsuitable version \"${MBEDTLS_VERSION}\", but a 2.x version is required (found ${MBEDTLS_INCLUDE_DIR})") message(${type} "Could NOT find MBEDTLS: Found unsuitable version \"${MBEDTLS_VERSION}\", but a 2.x version is required (found ${MBEDTLS_INCLUDE_DIR})")
endif() endif()
set(MBEDTLS_FOUND FALSE) set(MBEDTLS_FOUND FALSE)
else() else()
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MBEDTLS find_package_handle_standard_args(MBEDTLS
REQUIRED_VARS MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY REQUIRED_VARS MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY
VERSION_VAR MBEDTLS_VERSION) VERSION_VAR MBEDTLS_VERSION)
endif() endif()
mark_as_advanced(MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY) mark_as_advanced(MBEDTLS_INCLUDE_DIR MBEDTLS_LIBRARY MBEDX509_LIBRARY MBEDCRYPTO_LIBRARY)
if(MBEDTLS_FOUND) if(MBEDTLS_FOUND)
add_library(MbedTLS::mbedcrypto UNKNOWN IMPORTED) add_library(MbedTLS::mbedcrypto UNKNOWN IMPORTED)
set_target_properties(MbedTLS::mbedcrypto PROPERTIES set_target_properties(MbedTLS::mbedcrypto PROPERTIES
IMPORTED_LOCATION "${MBEDCRYPTO_LIBRARY}" IMPORTED_LOCATION "${MBEDCRYPTO_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${MBEDTLS_INCLUDE_DIR}" INTERFACE_INCLUDE_DIRECTORIES "${MBEDTLS_INCLUDE_DIR}"
) )
add_library(MbedTLS::mbedx509 UNKNOWN IMPORTED) add_library(MbedTLS::mbedx509 UNKNOWN IMPORTED)
set_target_properties(MbedTLS::mbedx509 PROPERTIES set_target_properties(MbedTLS::mbedx509 PROPERTIES
IMPORTED_LOCATION "${MBEDX509_LIBRARY}" IMPORTED_LOCATION "${MBEDX509_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${MBEDTLS_INCLUDE_DIR}" INTERFACE_INCLUDE_DIRECTORIES "${MBEDTLS_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES MbedTLS::mbedcrypto INTERFACE_LINK_LIBRARIES MbedTLS::mbedcrypto
) )
add_library(MbedTLS::mbedtls UNKNOWN IMPORTED) add_library(MbedTLS::mbedtls UNKNOWN IMPORTED)
set_target_properties(MbedTLS::mbedtls PROPERTIES set_target_properties(MbedTLS::mbedtls PROPERTIES
IMPORTED_LOCATION "${MBEDTLS_LIBRARY}" IMPORTED_LOCATION "${MBEDTLS_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${MBEDTLS_INCLUDE_DIR}" INTERFACE_INCLUDE_DIRECTORIES "${MBEDTLS_INCLUDE_DIR}"
INTERFACE_LINK_LIBRARIES MbedTLS::mbedx509 INTERFACE_LINK_LIBRARIES MbedTLS::mbedx509
) )
endif() endif()

View File

@@ -5,16 +5,16 @@ find_path(MINIUPNPC_INCLUDE_DIR miniupnpc.h PATH_SUFFIXES miniupnpc)
find_library(MINIUPNPC_LIBRARY miniupnpc) find_library(MINIUPNPC_LIBRARY miniupnpc)
if(MINIUPNPC_INCLUDE_DIR) if(MINIUPNPC_INCLUDE_DIR)
file(STRINGS "${MINIUPNPC_INCLUDE_DIR}/miniupnpc.h" MINIUPNPC_VERSION_STR REGEX "^#define[\t ]+MINIUPNPC_VERSION[\t ]+.*") file(STRINGS "${MINIUPNPC_INCLUDE_DIR}/miniupnpc.h" MINIUPNPC_VERSION_STR REGEX "^#define[\t ]+MINIUPNPC_VERSION[\t ]+.*")
if(MINIUPNPC_VERSION_STR) if(MINIUPNPC_VERSION_STR)
string(REGEX REPLACE "^#define[\t ]+MINIUPNPC_VERSION[\t ]+\"([.0-9]+)\"" "\\1" MINIUPNPC_VERSION ${MINIUPNPC_VERSION_STR}) string(REGEX REPLACE "^#define[\t ]+MINIUPNPC_VERSION[\t ]+\"([.0-9]+)\"" "\\1" MINIUPNPC_VERSION ${MINIUPNPC_VERSION_STR})
endif() endif()
endif() endif()
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args(MINIUPNPC find_package_handle_standard_args(MINIUPNPC
REQUIRED_VARS MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY REQUIRED_VARS MINIUPNPC_INCLUDE_DIR MINIUPNPC_LIBRARY
VERSION_VAR MINIUPNPC_VERSION VERSION_VAR MINIUPNPC_VERSION
) )
set(MINIUPNPC_LIBRARIES ${MINIUPNPC_LIBRARY}) set(MINIUPNPC_LIBRARIES ${MINIUPNPC_LIBRARY})

View File

@@ -52,13 +52,13 @@
# define the SFML_STATIC macro if static build was chosen # define the SFML_STATIC macro if static build was chosen
if(SFML_STATIC_LIBRARIES) if(SFML_STATIC_LIBRARIES)
add_definitions(-DSFML_STATIC) add_definitions(-DSFML_STATIC)
endif() endif()
# deduce the libraries suffix from the options # deduce the libraries suffix from the options
set(FIND_SFML_LIB_SUFFIX "") set(FIND_SFML_LIB_SUFFIX "")
if(SFML_STATIC_LIBRARIES) if(SFML_STATIC_LIBRARIES)
set(FIND_SFML_LIB_SUFFIX "${FIND_SFML_LIB_SUFFIX}-s") set(FIND_SFML_LIB_SUFFIX "${FIND_SFML_LIB_SUFFIX}-s")
endif() endif()
# find the SFML include directory # find the SFML include directory
@@ -79,41 +79,41 @@ find_path(SFML_INCLUDE_DIR SFML/Config.hpp
# check the version number # check the version number
set(SFML_VERSION_OK TRUE) set(SFML_VERSION_OK TRUE)
if(SFML_FIND_VERSION AND SFML_INCLUDE_DIR) if(SFML_FIND_VERSION AND SFML_INCLUDE_DIR)
# extract the major and minor version numbers from SFML/Config.hpp # extract the major and minor version numbers from SFML/Config.hpp
# we have to handle framework a little bit differently : # we have to handle framework a little bit differently :
if("${SFML_INCLUDE_DIR}" MATCHES "SFML.framework") if("${SFML_INCLUDE_DIR}" MATCHES "SFML.framework")
set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/Headers/Config.hpp") set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/Headers/Config.hpp")
else() else()
set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/SFML/Config.hpp") set(SFML_CONFIG_HPP_INPUT "${SFML_INCLUDE_DIR}/SFML/Config.hpp")
endif() endif()
FILE(READ "${SFML_CONFIG_HPP_INPUT}" SFML_CONFIG_HPP_CONTENTS) FILE(READ "${SFML_CONFIG_HPP_INPUT}" SFML_CONFIG_HPP_CONTENTS)
STRING(REGEX MATCH "#define SFML_VERSION_MAJOR[ \t]+([0-9]+)" SFML_VERSION_MAJOR_MATCH "${SFML_CONFIG_HPP_CONTENTS}") STRING(REGEX MATCH "#define SFML_VERSION_MAJOR[ \t]+([0-9]+)" SFML_VERSION_MAJOR_MATCH "${SFML_CONFIG_HPP_CONTENTS}")
STRING(REGEX MATCH "#define SFML_VERSION_MINOR[ \t]+([0-9]+)" SFML_VERSION_MINOR_MATCH "${SFML_CONFIG_HPP_CONTENTS}") STRING(REGEX MATCH "#define SFML_VERSION_MINOR[ \t]+([0-9]+)" SFML_VERSION_MINOR_MATCH "${SFML_CONFIG_HPP_CONTENTS}")
STRING(REGEX REPLACE "#define SFML_VERSION_MAJOR[ \t]+([0-9]+)" "\\1" SFML_VERSION_MAJOR "${SFML_VERSION_MAJOR_MATCH}") STRING(REGEX REPLACE "#define SFML_VERSION_MAJOR[ \t]+([0-9]+)" "\\1" SFML_VERSION_MAJOR "${SFML_VERSION_MAJOR_MATCH}")
STRING(REGEX REPLACE "#define SFML_VERSION_MINOR[ \t]+([0-9]+)" "\\1" SFML_VERSION_MINOR "${SFML_VERSION_MINOR_MATCH}") STRING(REGEX REPLACE "#define SFML_VERSION_MINOR[ \t]+([0-9]+)" "\\1" SFML_VERSION_MINOR "${SFML_VERSION_MINOR_MATCH}")
math(EXPR SFML_REQUESTED_VERSION "${SFML_FIND_VERSION_MAJOR} * 10 + ${SFML_FIND_VERSION_MINOR}") math(EXPR SFML_REQUESTED_VERSION "${SFML_FIND_VERSION_MAJOR} * 10 + ${SFML_FIND_VERSION_MINOR}")
# if we could extract them, compare with the requested version number # if we could extract them, compare with the requested version number
if (SFML_VERSION_MAJOR) if (SFML_VERSION_MAJOR)
# transform version numbers to an integer # transform version numbers to an integer
math(EXPR SFML_VERSION "${SFML_VERSION_MAJOR} * 10 + ${SFML_VERSION_MINOR}") math(EXPR SFML_VERSION "${SFML_VERSION_MAJOR} * 10 + ${SFML_VERSION_MINOR}")
# compare them # compare them
if(SFML_VERSION LESS SFML_REQUESTED_VERSION) if(SFML_VERSION LESS SFML_REQUESTED_VERSION)
set(SFML_VERSION_OK FALSE) set(SFML_VERSION_OK FALSE)
endif()
else()
# SFML version is < 3.0
if (SFML_REQUESTED_VERSION GREATER 29)
set(SFML_VERSION_OK FALSE)
if (SFML_REQUESTED_VERSION GREATER 19)
set(SFML_VERSION_MAJOR 1)
else()
set(SFML_VERSION_MAJOR 2)
endif()
set(SFML_VERSION_MINOR x)
endif()
endif() endif()
else()
# SFML version is < 3.0
if (SFML_REQUESTED_VERSION GREATER 29)
set(SFML_VERSION_OK FALSE)
if (SFML_REQUESTED_VERSION GREATER 19)
set(SFML_VERSION_MAJOR 1)
else()
set(SFML_VERSION_MAJOR 2)
endif()
set(SFML_VERSION_MINOR x)
endif()
endif()
endif() endif()
# find the requested modules # find the requested modules
@@ -130,101 +130,101 @@ set(FIND_SFML_LIB_PATHS
/opt/csw /opt/csw
/opt) /opt)
foreach(FIND_SFML_COMPONENT ${SFML_FIND_COMPONENTS}) foreach(FIND_SFML_COMPONENT ${SFML_FIND_COMPONENTS})
string(TOLOWER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_LOWER) string(TOLOWER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_LOWER)
string(TOUPPER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_UPPER) string(TOUPPER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_UPPER)
set(FIND_SFML_COMPONENT_NAME sfml-${FIND_SFML_COMPONENT_LOWER}${FIND_SFML_LIB_SUFFIX}) set(FIND_SFML_COMPONENT_NAME sfml-${FIND_SFML_COMPONENT_LOWER}${FIND_SFML_LIB_SUFFIX})
# no suffix for sfml-main, it is always a static library # no suffix for sfml-main, it is always a static library
if(FIND_SFML_COMPONENT_LOWER STREQUAL "main") if(FIND_SFML_COMPONENT_LOWER STREQUAL "main")
set(FIND_SFML_COMPONENT_NAME sfml-${FIND_SFML_COMPONENT_LOWER}) set(FIND_SFML_COMPONENT_NAME sfml-${FIND_SFML_COMPONENT_LOWER})
endif()
# debug library
find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG
NAMES ${FIND_SFML_COMPONENT_NAME}-d
PATH_SUFFIXES lib64 lib
PATHS ${FIND_SFML_LIB_PATHS})
# release library
find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE
NAMES ${FIND_SFML_COMPONENT_NAME}
PATH_SUFFIXES lib64 lib
PATHS ${FIND_SFML_LIB_PATHS})
if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG OR SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
# library found
set(SFML_${FIND_SFML_COMPONENT_UPPER}_FOUND TRUE)
# if both are found, set SFML_XXX_LIBRARY to contain both
if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG AND SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY debug ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG}
optimized ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE})
endif() endif()
# debug library # if only one debug/release variant is found, set the other to be equal to the found one
find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG AND NOT SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
NAMES ${FIND_SFML_COMPONENT_NAME}-d # debug and not release
PATH_SUFFIXES lib64 lib set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG})
PATHS ${FIND_SFML_LIB_PATHS}) set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG})
# release library
find_library(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE
NAMES ${FIND_SFML_COMPONENT_NAME}
PATH_SUFFIXES lib64 lib
PATHS ${FIND_SFML_LIB_PATHS})
if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG OR SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
# library found
set(SFML_${FIND_SFML_COMPONENT_UPPER}_FOUND TRUE)
# if both are found, set SFML_XXX_LIBRARY to contain both
if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG AND SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY debug ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG}
optimized ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE})
endif()
# if only one debug/release variant is found, set the other to be equal to the found one
if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG AND NOT SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE)
# debug and not release
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG})
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG})
endif()
if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE AND NOT SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG)
# release and not debug
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE})
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE})
endif()
else()
# library not found
set(SFML_FOUND FALSE)
set(SFML_${FIND_SFML_COMPONENT_UPPER}_FOUND FALSE)
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY "")
set(FIND_SFML_MISSING "${FIND_SFML_MISSING} SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY")
endif() endif()
if (SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE AND NOT SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG)
# release and not debug
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE})
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY ${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE})
endif()
else()
# library not found
set(SFML_FOUND FALSE)
set(SFML_${FIND_SFML_COMPONENT_UPPER}_FOUND FALSE)
set(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY "")
set(FIND_SFML_MISSING "${FIND_SFML_MISSING} SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY")
endif()
# mark as advanced # mark as advanced
MARK_AS_ADVANCED(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY MARK_AS_ADVANCED(SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY
SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_RELEASE
SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG) SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY_DEBUG)
# add to the global list of libraries # add to the global list of libraries
set(SFML_LIBRARIES ${SFML_LIBRARIES} "${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY}") set(SFML_LIBRARIES ${SFML_LIBRARIES} "${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY}")
endforeach() endforeach()
# handle errors # handle errors
if(NOT SFML_VERSION_OK) if(NOT SFML_VERSION_OK)
# SFML version not ok # SFML version not ok
set(FIND_SFML_ERROR "SFML found but version too low (requested: ${SFML_FIND_VERSION}, found: ${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR})") set(FIND_SFML_ERROR "SFML found but version too low (requested: ${SFML_FIND_VERSION}, found: ${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR})")
set(SFML_FOUND FALSE) set(SFML_FOUND FALSE)
elseif(NOT SFML_FOUND) elseif(NOT SFML_FOUND)
# include directory or library not found # include directory or library not found
set(FIND_SFML_ERROR "Could NOT find SFML (missing: ${FIND_SFML_MISSING})") set(FIND_SFML_ERROR "Could NOT find SFML (missing: ${FIND_SFML_MISSING})")
endif() endif()
if (NOT SFML_FOUND) if (NOT SFML_FOUND)
if(SFML_FIND_REQUIRED) if(SFML_FIND_REQUIRED)
# fatal error # fatal error
message(FATAL_ERROR ${FIND_SFML_ERROR}) message(FATAL_ERROR ${FIND_SFML_ERROR})
elseif(NOT SFML_FIND_QUIETLY) elseif(NOT SFML_FIND_QUIETLY)
# error but continue # error but continue
message(STATUS "${FIND_SFML_ERROR}") message(STATUS "${FIND_SFML_ERROR}")
endif() endif()
endif() endif()
# handle success # handle success
if(SFML_FOUND) if(SFML_FOUND)
message(STATUS "Found SFML ${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR} in ${SFML_INCLUDE_DIR}") message(STATUS "Found SFML ${SFML_VERSION_MAJOR}.${SFML_VERSION_MINOR} in ${SFML_INCLUDE_DIR}")
foreach(FIND_SFML_COMPONENT ${SFML_FIND_COMPONENTS}) foreach(FIND_SFML_COMPONENT ${SFML_FIND_COMPONENTS})
string(TOLOWER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_LOWER) string(TOLOWER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_LOWER)
string(TOUPPER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_UPPER) string(TOUPPER ${FIND_SFML_COMPONENT} FIND_SFML_COMPONENT_UPPER)
if(NOT TARGET sfml-${FIND_SFML_COMPONENT_LOWER}) if(NOT TARGET sfml-${FIND_SFML_COMPONENT_LOWER})
add_library(sfml-${FIND_SFML_COMPONENT_LOWER} UNKNOWN IMPORTED) add_library(sfml-${FIND_SFML_COMPONENT_LOWER} UNKNOWN IMPORTED)
set_target_properties(sfml-${FIND_SFML_COMPONENT_LOWER} PROPERTIES set_target_properties(sfml-${FIND_SFML_COMPONENT_LOWER} PROPERTIES
IMPORTED_LOCATION "${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY}" IMPORTED_LOCATION "${SFML_${FIND_SFML_COMPONENT_UPPER}_LIBRARY}"
INTERFACE_INCLUDE_DIRECTORIES "${SFML_INCLUDE_DIR}" INTERFACE_INCLUDE_DIRECTORIES "${SFML_INCLUDE_DIR}"
) )
if(NOT ${FIND_SFML_COMPONENT_LOWER} STREQUAL system) if(NOT ${FIND_SFML_COMPONENT_LOWER} STREQUAL system)
set_target_properties(sfml-${FIND_SFML_COMPONENT_LOWER} PROPERTIES set_target_properties(sfml-${FIND_SFML_COMPONENT_LOWER} PROPERTIES
INTERFACE_LINK_LIBRARIES sfml-system INTERFACE_LINK_LIBRARIES sfml-system
) )
endif() endif()
endif() endif()
endforeach() endforeach()
endif() endif()

View File

@@ -2,28 +2,28 @@ find_package(PkgConfig QUIET)
pkg_check_modules(PC_SYSTEMD QUIET "libsystemd") pkg_check_modules(PC_SYSTEMD QUIET "libsystemd")
if (PC_SYSTEMD_FOUND) if (PC_SYSTEMD_FOUND)
add_definitions(${PC_SYSTEMD_CFLAGS} ${PC_SYSTEMD_CFLAGS_OTHER}) add_definitions(${PC_SYSTEMD_CFLAGS} ${PC_SYSTEMD_CFLAGS_OTHER})
endif(PC_SYSTEMD_FOUND) endif(PC_SYSTEMD_FOUND)
find_path( find_path(
SYSTEMD_INCLUDE_DIRS SYSTEMD_INCLUDE_DIRS
NAMES systemd/sd-daemon.h NAMES systemd/sd-daemon.h
HINTS ${PC_SYSTEMD_INCLUDEDIR} ${PC_SYSTEMD_INCLUDE_DIRS} HINTS ${PC_SYSTEMD_INCLUDEDIR} ${PC_SYSTEMD_INCLUDE_DIRS}
) )
find_library( find_library(
SYSTEMD_LIBRARIES SYSTEMD_LIBRARIES
NAMES systemd NAMES systemd
HINTS ${PC_SYSTEMD_LIBDIR} ${PC_SYSTEMD_LIBRARY_DIRS} HINTS ${PC_SYSTEMD_LIBDIR} ${PC_SYSTEMD_LIBRARY_DIRS}
) )
include(FindPackageHandleStandardArgs) include(FindPackageHandleStandardArgs)
find_package_handle_standard_args( find_package_handle_standard_args(
SYSTEMD SYSTEMD
REQUIRED_VARS SYSTEMD_LIBRARIES SYSTEMD_INCLUDE_DIRS REQUIRED_VARS SYSTEMD_LIBRARIES SYSTEMD_INCLUDE_DIRS
) )
mark_as_advanced( mark_as_advanced(
SYSTEMD_FOUND SYSTEMD_FOUND
SYSTEMD_LIBRARIES SYSTEMD_INCLUDE_DIRS SYSTEMD_LIBRARIES SYSTEMD_INCLUDE_DIRS
) )

View File

@@ -8,9 +8,9 @@
# _flag - The compile flag to remove # _flag - The compile flag to remove
# #
macro(remove_cxx_flag_from_target _target _flag) macro(remove_cxx_flag_from_target _target _flag)
get_target_property(_target_cxx_flags ${_target} COMPILE_OPTIONS) get_target_property(_target_cxx_flags ${_target} COMPILE_OPTIONS)
if(_target_cxx_flags) if(_target_cxx_flags)
list(REMOVE_ITEM _target_cxx_flags ${_flag}) list(REMOVE_ITEM _target_cxx_flags ${_flag})
set_target_properties(${_target} PROPERTIES COMPILE_OPTIONS "${_target_cxx_flags}") set_target_properties(${_target} PROPERTIES COMPILE_OPTIONS "${_target_cxx_flags}")
endif() endif()
endmacro() endmacro()

View File

@@ -781,7 +781,7 @@ add_subdirectory(Externals/rangeset)
add_subdirectory(Externals/FatFs) add_subdirectory(Externals/FatFs)
if (USE_RETRO_ACHIEVEMENTS) if (USE_RETRO_ACHIEVEMENTS)
add_subdirectory(Externals/rcheevos) add_subdirectory(Externals/rcheevos)
endif() endif()
add_subdirectory(Externals/watcher) add_subdirectory(Externals/watcher)
@@ -800,7 +800,7 @@ file(REMOVE "${PROJECT_SOURCE_DIR}/Source/Core/Common/scmrev.h")
file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common) file(MAKE_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common)
if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common/scmrev.h) if (NOT EXISTS ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common/scmrev.h)
file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common/scmrev.h) file(TOUCH ${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common/scmrev.h)
endif() endif()
if(APPLE) if(APPLE)
@@ -819,13 +819,13 @@ endif()
find_package(Git) find_package(Git)
if(NOT GIT_FOUND) if(NOT GIT_FOUND)
set(GIT_EXECUTABLE "") set(GIT_EXECUTABLE "")
endif() endif()
add_custom_target( add_custom_target(
dolphin_scmrev dolphin_scmrev
${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} -DPROJECT_BINARY_DIR=${PROJECT_BINARY_DIR} -DDISTRIBUTOR=${DISTRIBUTOR} -DDOLPHIN_DEFAULT_UPDATE_TRACK=${DOLPHIN_DEFAULT_UPDATE_TRACK} -DGIT_FOUND=${GIT_FOUND} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -DDOLPHIN_WC_REVISION=${DOLPHIN_WC_REVISION} -DDOLPHIN_WC_DESCRIBE=${DOLPHIN_WC_DESCRIBE} -DDOLPHIN_WC_BRANCH=${DOLPHIN_WC_BRANCH} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} -P ${CMAKE_CURRENT_SOURCE_DIR}/CMake/ScmRevGen.cmake ${CMAKE_COMMAND} -DPROJECT_SOURCE_DIR=${PROJECT_SOURCE_DIR} -DPROJECT_BINARY_DIR=${PROJECT_BINARY_DIR} -DDISTRIBUTOR=${DISTRIBUTOR} -DDOLPHIN_DEFAULT_UPDATE_TRACK=${DOLPHIN_DEFAULT_UPDATE_TRACK} -DGIT_FOUND=${GIT_FOUND} -DGIT_EXECUTABLE=${GIT_EXECUTABLE} -DDOLPHIN_WC_REVISION=${DOLPHIN_WC_REVISION} -DDOLPHIN_WC_DESCRIBE=${DOLPHIN_WC_DESCRIBE} -DDOLPHIN_WC_BRANCH=${DOLPHIN_WC_BRANCH} -DCMAKE_OSX_DEPLOYMENT_TARGET=${CMAKE_OSX_DEPLOYMENT_TARGET} -P ${CMAKE_CURRENT_SOURCE_DIR}/CMake/ScmRevGen.cmake
BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common/scmrev.h" "${CMAKE_CURRENT_BINARY_DIR}/Source/Core/DolphinQt/Info.plist" "${CMAKE_CURRENT_BINARY_DIR}/Source/Core/MacUpdater/Info.plist" "${CMAKE_CURRENT_BINARY_DIR}/Flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml" BYPRODUCTS "${CMAKE_CURRENT_BINARY_DIR}/Source/Core/Common/scmrev.h" "${CMAKE_CURRENT_BINARY_DIR}/Source/Core/DolphinQt/Info.plist" "${CMAKE_CURRENT_BINARY_DIR}/Source/Core/MacUpdater/Info.plist" "${CMAKE_CURRENT_BINARY_DIR}/Flatpak/org.DolphinEmu.dolphin-emu.metainfo.xml"
VERBATIM VERBATIM
) )
# This is here so #include "Common/scmrev.h" finds the generated header. # This is here so #include "Common/scmrev.h" finds the generated header.

View File

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

View File

@@ -1,25 +1,25 @@
set(SRC_NETWORK set(SRC_NETWORK
SFML/src/SFML/Network/Http.cpp SFML/src/SFML/Network/Http.cpp
SFML/src/SFML/Network/IpAddress.cpp SFML/src/SFML/Network/IpAddress.cpp
SFML/src/SFML/Network/Packet.cpp SFML/src/SFML/Network/Packet.cpp
SFML/src/SFML/Network/Socket.cpp SFML/src/SFML/Network/Socket.cpp
SFML/src/SFML/Network/SocketSelector.cpp SFML/src/SFML/Network/SocketSelector.cpp
SFML/src/SFML/Network/TcpListener.cpp SFML/src/SFML/Network/TcpListener.cpp
SFML/src/SFML/Network/TcpSocket.cpp SFML/src/SFML/Network/TcpSocket.cpp
SFML/src/SFML/Network/UdpSocket.cpp SFML/src/SFML/Network/UdpSocket.cpp
) )
if(WIN32) 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() else()
list(APPEND SRC_NETWORK SFML/src/SFML/Network/Unix/SocketImpl.cpp) list(APPEND SRC_NETWORK SFML/src/SFML/Network/Unix/SocketImpl.cpp)
endif() endif()
set(SRC_SYSTEM set(SRC_SYSTEM
SFML/src/SFML/System/Err.cpp SFML/src/SFML/System/Err.cpp
SFML/include/SFML/System/String.hpp SFML/include/SFML/System/String.hpp
SFML/src/SFML/System/String.cpp SFML/src/SFML/System/String.cpp
SFML/src/SFML/System/Utils.cpp SFML/src/SFML/System/Utils.cpp
) )
add_library(sfml-network STATIC ${SRC_NETWORK}) 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_include_directories(sfml-network PUBLIC SFML/include PRIVATE SFML/src)
target_link_libraries(sfml-network PUBLIC sfml-system) target_link_libraries(sfml-network PUBLIC sfml-system)
dolphin_disable_warnings(sfml-network) 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) option(WIL_BUILD_TESTS "Sets option to build the unit tests, default on" ON)
if (NOT DEFINED WIL_BUILD_VERSION) if (NOT DEFINED WIL_BUILD_VERSION)
set(WIL_BUILD_VERSION "0.0.0") set(WIL_BUILD_VERSION "0.0.0")
endif() endif()
if (NOT DEFINED CPPWINRT_VERSION) if (NOT DEFINED CPPWINRT_VERSION)
set(CPPWINRT_VERSION "2.0.221121.5") set(CPPWINRT_VERSION "2.0.221121.5")
endif() endif()
# Detect the Windows SDK version. If we're using the Visual Studio generator, this will be provided for us. Otherwise # 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) # 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) 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() else()
# This has a trailing backslash for whatever reason... # This has a trailing backslash for whatever reason...
string(REGEX REPLACE "\\\\$" "" WIL_WINDOWS_SDK_VERSION "$ENV{WindowsSDKVersion}") string(REGEX REPLACE "\\\\$" "" WIL_WINDOWS_SDK_VERSION "$ENV{WindowsSDKVersion}")
endif() endif()
if (${WIL_BUILD_PACKAGING}) if (${WIL_BUILD_PACKAGING})
add_subdirectory(packaging) add_subdirectory(packaging)
endif() endif()
if (${WIL_BUILD_TESTS}) if (${WIL_BUILD_TESTS})
add_subdirectory(tests) add_subdirectory(tests)
endif() endif()
# Gather headers into an interface library. # Gather headers into an interface library.
@@ -40,23 +40,23 @@ add_library(${PROJECT_NAME}::${PROJECT_NAME} ALIAS ${PROJECT_NAME})
# The interface's include directory. # The interface's include directory.
target_include_directories(${PROJECT_NAME} INTERFACE target_include_directories(${PROJECT_NAME} INTERFACE
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}> $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include> $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
) )
# Include the .natvis files # Include the .natvis files
if (MSVC) if (MSVC)
target_sources(${PROJECT_NAME} INTERFACE target_sources(${PROJECT_NAME} INTERFACE
"$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/natvis/wil.natvis>") "$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/natvis/wil.natvis>")
endif() endif()
# Install Package Configuration # Install Package Configuration
string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER) string(TOLOWER ${PROJECT_NAME} PROJECT_NAME_LOWER)
install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME_LOWER}_targets) install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME_LOWER}_targets)
install(EXPORT ${PROJECT_NAME_LOWER}_targets install(EXPORT ${PROJECT_NAME_LOWER}_targets
NAMESPACE ${PROJECT_NAME}:: NAMESPACE ${PROJECT_NAME}::
FILE ${PROJECT_NAME_LOWER}Config.cmake FILE ${PROJECT_NAME_LOWER}Config.cmake
DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/${PROJECT_NAME}" DESTINATION "${CMAKE_INSTALL_DATADIR}/cmake/${PROJECT_NAME}"
) )
# Install the headers at a standard cmake location. # 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 # in CMake 2.4.x does not automatically do so and we want
# compatibility with CMake 2.4.x. # compatibility with CMake 2.4.x.
if(HAVE_SYS_TYPES_H) if(HAVE_SYS_TYPES_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H) list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_SYS_TYPES_H)
endif() endif()
if(HAVE_STDINT_H) if(HAVE_STDINT_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H) list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDINT_H)
endif() endif()
if(HAVE_STDDEF_H) if(HAVE_STDDEF_H)
list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H) list(APPEND CMAKE_REQUIRED_DEFINITIONS -DHAVE_STDDEF_H)
endif() endif()
check_type_size(off64_t OFF64_T) check_type_size(off64_t OFF64_T)
if(HAVE_OFF64_T) if(HAVE_OFF64_T)
add_definitions(-D_LARGEFILE64_SOURCE=1) add_definitions(-D_LARGEFILE64_SOURCE=1)
endif() endif()
set(CMAKE_REQUIRED_DEFINITIONS) # clear variable set(CMAKE_REQUIRED_DEFINITIONS) # clear variable
# Check for fseeko # Check for fseeko
check_function_exists(fseeko HAVE_FSEEKO) check_function_exists(fseeko HAVE_FSEEKO)
if(NOT HAVE_FSEEKO) if(NOT HAVE_FSEEKO)
add_definitions(-DNO_FSEEKO) add_definitions(-DNO_FSEEKO)
endif() endif()
# #
@@ -41,12 +41,12 @@ endif()
# #
check_include_file(unistd.h HAVE_UNISTD_H) check_include_file(unistd.h HAVE_UNISTD_H)
if(HAVE_UNISTD_H) if(HAVE_UNISTD_H)
add_definitions(-DHAVE_UNISTD_H) add_definitions(-DHAVE_UNISTD_H)
endif() endif()
if(MSVC) if(MSVC)
add_definitions(-D_CRT_SECURE_NO_DEPRECATE) add_definitions(-D_CRT_SECURE_NO_DEPRECATE)
add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE) add_definitions(-D_CRT_NONSTDC_NO_DEPRECATE)
endif() endif()
#============================================================================ #============================================================================
@@ -54,19 +54,19 @@ endif()
#============================================================================ #============================================================================
set(BZIP2_PUBLIC_HDRS set(BZIP2_PUBLIC_HDRS
bzip2/bzlib.h bzip2/bzlib.h
) )
set(BZIP2_PRIVATE_HDRS set(BZIP2_PRIVATE_HDRS
bzip2/bzlib_private.h bzip2/bzlib_private.h
) )
set(BZIP2_SRCS set(BZIP2_SRCS
bzip2/blocksort.c bzip2/blocksort.c
bzip2/huffman.c bzip2/huffman.c
bzip2/crctable.c bzip2/crctable.c
bzip2/randtable.c bzip2/randtable.c
bzip2/compress.c bzip2/compress.c
bzip2/decompress.c bzip2/decompress.c
bzip2/bzlib.c bzip2/bzlib.c
) )
add_library(bzip2 STATIC ${BZIP2_SRCS} ${BZIP2_PUBLIC_HDRS} ${BZIP2_PRIVATE_HDRS}) add_library(bzip2 STATIC ${BZIP2_SRCS} ${BZIP2_PUBLIC_HDRS} ${BZIP2_PRIVATE_HDRS})
@@ -75,5 +75,5 @@ dolphin_disable_warnings(bzip2)
target_include_directories(bzip2 target_include_directories(bzip2
PUBLIC PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}/bzip2 ${CMAKE_CURRENT_SOURCE_DIR}/bzip2
) )

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@@ -1,4 +1,4 @@
add_library(RangeSet::RangeSet INTERFACE IMPORTED GLOBAL) add_library(RangeSet::RangeSet INTERFACE IMPORTED GLOBAL)
set_target_properties(RangeSet::RangeSet PROPERTIES 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 add_library(rcheevos
rcheevos/include/rc_api_editor.h rcheevos/include/rc_api_editor.h
rcheevos/include/rc_api_info.h rcheevos/include/rc_api_info.h
rcheevos/include/rc_api_request.h rcheevos/include/rc_api_request.h
rcheevos/include/rc_api_runtime.h rcheevos/include/rc_api_runtime.h
rcheevos/include/rc_api_user.h rcheevos/include/rc_api_user.h
rcheevos/include/rc_client.h rcheevos/include/rc_client.h
rcheevos/include/rc_client_raintegration.h rcheevos/include/rc_client_raintegration.h
rcheevos/include/rc_consoles.h rcheevos/include/rc_consoles.h
rcheevos/include/rc_error.h rcheevos/include/rc_error.h
rcheevos/include/rc_export.h rcheevos/include/rc_export.h
rcheevos/include/rc_hash.h rcheevos/include/rc_hash.h
rcheevos/include/rcheevos.h rcheevos/include/rcheevos.h
rcheevos/include/rc_runtime.h rcheevos/include/rc_runtime.h
rcheevos/include/rc_runtime_types.h rcheevos/include/rc_runtime_types.h
rcheevos/include/rc_util.h rcheevos/include/rc_util.h
rcheevos/src/rapi/rc_api_common.c rcheevos/src/rapi/rc_api_common.c
rcheevos/src/rapi/rc_api_common.h rcheevos/src/rapi/rc_api_common.h
rcheevos/src/rapi/rc_api_editor.c rcheevos/src/rapi/rc_api_editor.c
rcheevos/src/rapi/rc_api_info.c rcheevos/src/rapi/rc_api_info.c
rcheevos/src/rapi/rc_api_runtime.c rcheevos/src/rapi/rc_api_runtime.c
rcheevos/src/rapi/rc_api_user.c rcheevos/src/rapi/rc_api_user.c
rcheevos/src/rcheevos/alloc.c rcheevos/src/rcheevos/alloc.c
rcheevos/src/rcheevos/condition.c rcheevos/src/rcheevos/condition.c
rcheevos/src/rcheevos/condset.c rcheevos/src/rcheevos/condset.c
rcheevos/src/rcheevos/consoleinfo.c rcheevos/src/rcheevos/consoleinfo.c
rcheevos/src/rcheevos/format.c rcheevos/src/rcheevos/format.c
rcheevos/src/rcheevos/lboard.c rcheevos/src/rcheevos/lboard.c
rcheevos/src/rcheevos/memref.c rcheevos/src/rcheevos/memref.c
rcheevos/src/rcheevos/operand.c rcheevos/src/rcheevos/operand.c
rcheevos/src/rcheevos/rc_internal.h rcheevos/src/rcheevos/rc_internal.h
rcheevos/src/rcheevos/rc_validate.c rcheevos/src/rcheevos/rc_validate.c
rcheevos/src/rcheevos/rc_validate.h rcheevos/src/rcheevos/rc_validate.h
rcheevos/src/rcheevos/richpresence.c rcheevos/src/rcheevos/richpresence.c
rcheevos/src/rcheevos/runtime.c rcheevos/src/rcheevos/runtime.c
rcheevos/src/rcheevos/runtime_progress.c rcheevos/src/rcheevos/runtime_progress.c
rcheevos/src/rcheevos/trigger.c rcheevos/src/rcheevos/trigger.c
rcheevos/src/rcheevos/value.c rcheevos/src/rcheevos/value.c
rcheevos/src/rhash/aes.c rcheevos/src/rhash/aes.c
rcheevos/src/rhash/aes.h rcheevos/src/rhash/aes.h
rcheevos/src/rhash/cdreader.c rcheevos/src/rhash/cdreader.c
rcheevos/src/rhash/hash.c rcheevos/src/rhash/hash.c
rcheevos/src/rhash/hash_disc.c rcheevos/src/rhash/hash_disc.c
rcheevos/src/rhash/md5.c rcheevos/src/rhash/md5.c
rcheevos/src/rhash/md5.h rcheevos/src/rhash/md5.h
rcheevos/src/rhash/rc_hash_internal.h rcheevos/src/rhash/rc_hash_internal.h
rcheevos/src/rc_client.c rcheevos/src/rc_client.c
rcheevos/src/rc_client_external.c rcheevos/src/rc_client_external.c
rcheevos/src/rc_client_external.h rcheevos/src/rc_client_external.h
rcheevos/src/rc_client_external_versions.h rcheevos/src/rc_client_external_versions.h
rcheevos/src/rc_client_internal.h rcheevos/src/rc_client_internal.h
rcheevos/src/rc_client_raintegration.c rcheevos/src/rc_client_raintegration.c
rcheevos/src/rc_client_raintegration_internal.h rcheevos/src/rc_client_raintegration_internal.h
rcheevos/src/rc_compat.c rcheevos/src/rc_compat.c
rcheevos/src/rc_compat.h rcheevos/src/rc_compat.h
rcheevos/src/rc_util.c rcheevos/src/rc_util.c
rcheevos/src/rc_version.c rcheevos/src/rc_version.c
rcheevos/src/rc_version.h rcheevos/src/rc_version.h
) )
dolphin_disable_warnings(rcheevos) 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") target_compile_definitions(rcheevos PRIVATE "RC_HASH_NO_ZIP")
if(CMAKE_SYSTEM_NAME MATCHES "Windows") if(CMAKE_SYSTEM_NAME MATCHES "Windows")
target_compile_definitions(rcheevos PRIVATE "RC_CLIENT_SUPPORTS_RAINTEGRATION") 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() endif()

View File

@@ -1,32 +1,32 @@
set(SRCS set(SRCS
SPIRV-Cross/GLSL.std.450.h SPIRV-Cross/GLSL.std.450.h
SPIRV-Cross/spirv.h SPIRV-Cross/spirv.h
SPIRV-Cross/spirv.hpp SPIRV-Cross/spirv.hpp
SPIRV-Cross/spirv_cfg.cpp SPIRV-Cross/spirv_cfg.cpp
SPIRV-Cross/spirv_cfg.hpp SPIRV-Cross/spirv_cfg.hpp
SPIRV-Cross/spirv_common.hpp SPIRV-Cross/spirv_common.hpp
SPIRV-Cross/spirv_cpp.cpp SPIRV-Cross/spirv_cpp.cpp
SPIRV-Cross/spirv_cpp.hpp SPIRV-Cross/spirv_cpp.hpp
SPIRV-Cross/spirv_cross.cpp SPIRV-Cross/spirv_cross.cpp
SPIRV-Cross/spirv_cross.hpp SPIRV-Cross/spirv_cross.hpp
SPIRV-Cross/spirv_cross_c.cpp SPIRV-Cross/spirv_cross_c.cpp
SPIRV-Cross/spirv_cross_c.h SPIRV-Cross/spirv_cross_c.h
SPIRV-Cross/spirv_cross_containers.hpp SPIRV-Cross/spirv_cross_containers.hpp
SPIRV-Cross/spirv_cross_error_handling.hpp SPIRV-Cross/spirv_cross_error_handling.hpp
SPIRV-Cross/spirv_cross_parsed_ir.cpp SPIRV-Cross/spirv_cross_parsed_ir.cpp
SPIRV-Cross/spirv_cross_parsed_ir.hpp SPIRV-Cross/spirv_cross_parsed_ir.hpp
SPIRV-Cross/spirv_cross_util.cpp SPIRV-Cross/spirv_cross_util.cpp
SPIRV-Cross/spirv_cross_util.hpp SPIRV-Cross/spirv_cross_util.hpp
SPIRV-Cross/spirv_glsl.cpp SPIRV-Cross/spirv_glsl.cpp
SPIRV-Cross/spirv_glsl.hpp SPIRV-Cross/spirv_glsl.hpp
SPIRV-Cross/spirv_hlsl.cpp SPIRV-Cross/spirv_hlsl.cpp
SPIRV-Cross/spirv_hlsl.hpp SPIRV-Cross/spirv_hlsl.hpp
SPIRV-Cross/spirv_msl.cpp SPIRV-Cross/spirv_msl.cpp
SPIRV-Cross/spirv_msl.hpp SPIRV-Cross/spirv_msl.hpp
SPIRV-Cross/spirv_parser.cpp SPIRV-Cross/spirv_parser.cpp
SPIRV-Cross/spirv_parser.hpp SPIRV-Cross/spirv_parser.hpp
SPIRV-Cross/spirv_reflect.cpp SPIRV-Cross/spirv_reflect.cpp
SPIRV-Cross/spirv_reflect.hpp SPIRV-Cross/spirv_reflect.hpp
) )
if(NOT MSVC) if(NOT MSVC)
@@ -40,9 +40,9 @@ add_compile_options(-Wno-sign-compare)
add_compile_options(-Wno-parentheses) add_compile_options(-Wno-parentheses)
add_compile_options(-Wno-unused-variable) add_compile_options(-Wno-unused-variable)
if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU") 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") elseif("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
add_compile_options(-Wno-missing-variable-declarations) add_compile_options(-Wno-missing-variable-declarations)
endif() endif()
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_NO_EXTERNAL_IMAGE)
target_compile_definitions(tinygltf PUBLIC TINYGLTF_USE_CPP14) target_compile_definitions(tinygltf PUBLIC TINYGLTF_USE_CPP14)
if (NOT MSVC) if (NOT MSVC)
target_compile_features(tinygltf PRIVATE cxx_std_20) target_compile_features(tinygltf PRIVATE cxx_std_20)
endif() endif()
target_sources(tinygltf PRIVATE target_sources(tinygltf PRIVATE
tinygltf/tiny_gltf.cc) tinygltf/tiny_gltf.cc)

View File

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

View File

@@ -76,7 +76,7 @@ add_definitions(-D__STDC_CONSTANT_MACROS)
check_symbol_exists(elf_aux_info sys/auxv.h HAVE_ELF_AUX_INFO) check_symbol_exists(elf_aux_info sys/auxv.h HAVE_ELF_AUX_INFO)
if(HAVE_ELF_AUX_INFO) if(HAVE_ELF_AUX_INFO)
add_definitions(-DHAVE_ELF_AUX_INFO) add_definitions(-DHAVE_ELF_AUX_INFO)
endif() endif()
add_subdirectory(Core) add_subdirectory(Core)

View File

@@ -377,8 +377,8 @@ add_executable(dolphin-emu
Settings/GeneralPane.h Settings/GeneralPane.h
Settings/InterfacePane.cpp Settings/InterfacePane.cpp
Settings/InterfacePane.h Settings/InterfacePane.h
Settings/OnScreenDisplayPane.cpp Settings/OnScreenDisplayPane.cpp
Settings/OnScreenDisplayPane.h Settings/OnScreenDisplayPane.h
Settings/PathPane.cpp Settings/PathPane.cpp
Settings/PathPane.h Settings/PathPane.h
Settings/USBDevicePicker.cpp Settings/USBDevicePicker.cpp

View File

@@ -24,12 +24,12 @@ target_sources(MacUpdater PRIVATE "${CMAKE_SOURCE_DIR}/Data/Dolphin.icns")
set_source_files_properties("${CMAKE_SOURCE_DIR}/Data/Dolphin.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources) set_source_files_properties("${CMAKE_SOURCE_DIR}/Data/Dolphin.icns" PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
target_link_libraries(MacUpdater PRIVATE target_link_libraries(MacUpdater PRIVATE
"-framework Cocoa" "-framework Cocoa"
"-framework AppKit" "-framework AppKit"
"-framework CoreData" "-framework CoreData"
"-framework Foundation" "-framework Foundation"
uicommon uicommon
updatercommon updatercommon
) )
# Compile storyboards (Adapted from https://gitlab.kitware.com/cmake/community/wikis/doc/tutorials/OSX-InterfaceBuilderFiles) # Compile storyboards (Adapted from https://gitlab.kitware.com/cmake/community/wikis/doc/tutorials/OSX-InterfaceBuilderFiles)

View File

@@ -23,37 +23,37 @@ target_compile_options(build_pch PUBLIC /Fp$<TARGET_FILE_DIR:build_pch>/dolphin.
# Sharing a PCH breaks pdb files. So we use the /Z7 option to inline the pdb into # Sharing a PCH breaks pdb files. So we use the /Z7 option to inline the pdb into
# the binary. However MSVC gets noisy if you set both /Zi and /Z7 # the binary. However MSVC gets noisy if you set both /Zi and /Z7
if (POLICY CMP0141) if (POLICY CMP0141)
# CMake 3.25 has a policy that makes us control this somewhat sanely # CMake 3.25 has a policy that makes us control this somewhat sanely
set_property(TARGET build_pch PROPERTY MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>") set_property(TARGET build_pch PROPERTY MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>")
# Unfortnually, properties don't propagate. So we also set it globally via parent scope # Unfortnually, properties don't propagate. So we also set it globally via parent scope
set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>" PARENT_SCOPE) set(CMAKE_MSVC_DEBUG_INFORMATION_FORMAT "$<$<CONFIG:Debug,RelWithDebInfo>:Embedded>" PARENT_SCOPE)
else() else()
if (CMAKE_CXX_FLAGS_DEBUG MATCHES "/Zi") if (CMAKE_CXX_FLAGS_DEBUG MATCHES "/Zi")
# Otherwise we do an ugly string replace to remove it from FLAGS_DEBUG # Otherwise we do an ugly string replace to remove it from FLAGS_DEBUG
string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}") string(REPLACE "/Zi" "/Z7" CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}")
string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}") string(REPLACE "/Zi" "/Z7" CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}")
# and also overwrite the version in the parent scope # and also overwrite the version in the parent scope
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" PARENT_SCOPE) set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG}" PARENT_SCOPE)
set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}" PARENT_SCOPE) set(CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG}" PARENT_SCOPE)
target_compile_options(build_pch PUBLIC "$<$<CONFIG:Debug,RelWithDebInfo>:/Z7>") target_compile_options(build_pch PUBLIC "$<$<CONFIG:Debug,RelWithDebInfo>:/Z7>")
endif() endif()
endif() endif()
# Setting /Z7 also requires us to disable minimal rebuilds. # Setting /Z7 also requires us to disable minimal rebuilds.
target_compile_options(build_pch PUBLIC "$<$<CONFIG:Debug,RelWithDebInfo>:/Gm->") target_compile_options(build_pch PUBLIC "$<$<CONFIG:Debug,RelWithDebInfo>:/Gm->")
# To get this working with ninja, we need to tell it that compiling pch.cpp generates an extra output # To get this working with ninja, we need to tell it that compiling pch.cpp generates an extra output
set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp PROPERTIES set_source_files_properties(${CMAKE_CURRENT_SOURCE_DIR}/pch.cpp PROPERTIES
OBJECT_OUTPUTS $<TARGET_FILE_DIR:build_pch>/dolphin.pch OBJECT_OUTPUTS $<TARGET_FILE_DIR:build_pch>/dolphin.pch
) )
# and then create a custom target that depends on the pch output # and then create a custom target that depends on the pch output
# so that ninja won't start building anything that depends on this # so that ninja won't start building anything that depends on this
# target before the pch is built # target before the pch is built
add_custom_target(force_build_pch add_custom_target(force_build_pch
DEPENDS $<TARGET_FILE_DIR:build_pch>/dolphin.pch DEPENDS $<TARGET_FILE_DIR:build_pch>/dolphin.pch
) )
# link the pch into anything that depends on use_pch # link the pch into anything that depends on use_pch