mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-22 09:09:18 +01:00
build: minor refactoring and fixes
- Fix target_precompile_headers() usage; the CemuCommon target exposes the src/Common/precompiled.h precompiled header as part of its public interface with target_precompile_headers(CemuCommon PUBLIC precompiled.h), so all the other targets wanting to use the precompiled header have to link to the CemuCommon target with target_precompile_headers(TargetName PRIVATE CemuCommon). - Set the project version to 2.0 - Set RUNTIME_OUTPUT_DIRECTORY instead of only their _DEBUG and _RELEASE variants, fixing the compilation when neither build types are defined - Use a consistent indentation style (tabs, like in the .cpp files) - Use "modern" variants of some functions, e.g. add_definitions -> add_compile_definitions
This commit is contained in:
parent
b1e92f1779
commit
719ee90b27
@ -4,11 +4,6 @@ option(PUBLIC_RELEASE "Compile with debug asserts disabled and no console" OFF)
|
|||||||
option(ENABLE_VCPKG "Enable the vcpkg package manager" ON)
|
option(ENABLE_VCPKG "Enable the vcpkg package manager" ON)
|
||||||
set(EXPERIMENTAL_VERSION "" CACHE STRING "") # used by CI script to set experimental version
|
set(EXPERIMENTAL_VERSION "" CACHE STRING "") # used by CI script to set experimental version
|
||||||
|
|
||||||
if (PUBLIC_RELEASE)
|
|
||||||
add_definitions(-DPUBLIC_RELEASE)
|
|
||||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) # enable LTO
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if (EXPERIMENTAL_VERSION)
|
if (EXPERIMENTAL_VERSION)
|
||||||
add_definitions(-DEMULATOR_VERSION_MINOR=${EXPERIMENTAL_VERSION})
|
add_definitions(-DEMULATOR_VERSION_MINOR=${EXPERIMENTAL_VERSION})
|
||||||
endif()
|
endif()
|
||||||
@ -25,8 +20,7 @@ if (ENABLE_VCPKG)
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
project(Cemu VERSION 2.0)
|
||||||
project(Cemu VERSION 0.1)
|
|
||||||
|
|
||||||
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
list(APPEND CMAKE_MODULE_PATH "${PROJECT_SOURCE_DIR}/cmake")
|
||||||
|
|
||||||
@ -35,19 +29,20 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|||||||
|
|
||||||
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
|
||||||
|
|
||||||
|
if (PUBLIC_RELEASE)
|
||||||
|
add_compile_definitions(PUBLIC_RELEASE)
|
||||||
|
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE) # enable LTO
|
||||||
|
endif()
|
||||||
|
|
||||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||||
|
|
||||||
if (MSVC)
|
if (MSVC)
|
||||||
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT CemuBin)
|
set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT CemuBin)
|
||||||
endif()
|
# floating point model: precise, fiber safe optimizations
|
||||||
|
add_compile_options(/EHsc /fp:precise /GT)
|
||||||
if (MSVC)
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise") # floating point model: precise
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GT") # fiber safe optimizations
|
|
||||||
if (PUBLIC_RELEASE)
|
if (PUBLIC_RELEASE)
|
||||||
message(STATUS "Using additional optimization flags for MSVC")
|
message(STATUS "Using additional optimization flags for MSVC")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Oi /Ot") # enable intrinsic functions, favor speed
|
add_compile_options(/Oi /Ot) # enable intrinsic functions, favor speed
|
||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
@ -59,7 +54,7 @@ option(ENABLE_DISCORD_RPC "Enables the Discord Rich Presence feature" ON)
|
|||||||
if (WIN32)
|
if (WIN32)
|
||||||
option(ENABLE_XINPUT "Enables the usage of XInput" ON)
|
option(ENABLE_XINPUT "Enables the usage of XInput" ON)
|
||||||
option(ENABLE_DIRECTINPUT "Enables the usage of DirectInput" ON)
|
option(ENABLE_DIRECTINPUT "Enables the usage of DirectInput" ON)
|
||||||
add_definitions(-DHAS_DIRECTINPUT)
|
add_compile_definitions(HAS_DIRECTINPUT)
|
||||||
endif()
|
endif()
|
||||||
option(ENABLE_SDL "Enables the SDLController backend" ON)
|
option(ENABLE_SDL "Enables the SDLController backend" ON)
|
||||||
|
|
||||||
@ -107,7 +102,7 @@ if (ENABLE_OPENGL)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_DISCORD_RPC)
|
if (ENABLE_DISCORD_RPC)
|
||||||
add_definitions(-DENABLE_DISCORD_RPC)
|
add_compile_definitions(ENABLE_DISCORD_RPC)
|
||||||
add_subdirectory(dependencies/discord-rpc EXCLUDE_FROM_ALL)
|
add_subdirectory(dependencies/discord-rpc EXCLUDE_FROM_ALL)
|
||||||
target_include_directories(discord-rpc INTERFACE ./dependencies/discord-rpc/include)
|
target_include_directories(discord-rpc INTERFACE ./dependencies/discord-rpc/include)
|
||||||
endif()
|
endif()
|
||||||
|
@ -2,42 +2,43 @@ project(cemuMain)
|
|||||||
|
|
||||||
option(CEMU_CXX_FLAGS "Additional flags used for compiling Cemu source code")
|
option(CEMU_CXX_FLAGS "Additional flags used for compiling Cemu source code")
|
||||||
if(CEMU_CXX_FLAGS)
|
if(CEMU_CXX_FLAGS)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${CEMU_CXX_FLAGS}")
|
add_compile_options(${CEMU_CXX_FLAGS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(CMAKE_SIZEOF_VOID_P EQUAL 8)
|
if(NOT CMAKE_SIZEOF_VOID_P EQUAL 8)
|
||||||
# all ok
|
|
||||||
else()
|
|
||||||
message( FATAL_ERROR "Pointers are not 64bit" )
|
message( FATAL_ERROR "Pointers are not 64bit" )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_definitions(-DWIN32_LEAN_AND_MEAN)
|
add_compile_definitions(WIN32_LEAN_AND_MEAN CURL_STATICLIB)
|
||||||
add_definitions(-DCURL_STATICLIB)
|
#add_compile_definitions(VK_USE_PLATFORM_WIN32_KHR)
|
||||||
#add_definitions(-DVK_USE_PLATFORM_WIN32_KHR)
|
|
||||||
# _CRT_SECURE_NO_WARNINGS
|
# _CRT_SECURE_NO_WARNINGS
|
||||||
# _WINSOCK_DEPRECATED_NO_WARNINGS
|
# _WINSOCK_DEPRECATED_NO_WARNINGS
|
||||||
# _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
|
# _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING
|
||||||
# _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
|
# _SILENCE_ALL_CXX17_DEPRECATION_WARNINGS
|
||||||
elseif(UNIX)
|
elseif(UNIX)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
add_definitions(-D_XOPEN_SOURCE)
|
add_compile_definitions(
|
||||||
add_definitions(-DVK_USE_PLATFORM_MACOS_MVK)
|
_XOPEN_SOURCE
|
||||||
add_definitions(-DVK_USE_PLATFORM_METAL_EXT)
|
VK_USE_PLATFORM_MACOS_MVK
|
||||||
|
VK_USE_PLATFORM_METAL_EXT
|
||||||
|
)
|
||||||
else()
|
else()
|
||||||
add_definitions(-DVK_USE_PLATFORM_XLIB_KHR) # legacy. Do we need to support XLIB surfaces?
|
add_compile_definitions(
|
||||||
add_definitions(-DVK_USE_PLATFORM_XCB_KHR)
|
VK_USE_PLATFORM_XLIB_KHR # legacy. Do we need to support XLIB surfaces?
|
||||||
|
VK_USE_PLATFORM_XCB_KHR
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
add_definitions(-maes)
|
add_compile_options(-maes)
|
||||||
# warnings
|
# warnings
|
||||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||||
add_compile_options(-Wno-ambiguous-reversed-operator)
|
add_compile_options(-Wno-ambiguous-reversed-operator)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_compile_options(-Wno-multichar -Wno-invalid-offsetof -Wno-switch -Wno-ignored-attributes -Wno-deprecated-enum-enum-conversion)
|
add_compile_options(-Wno-multichar -Wno-invalid-offsetof -Wno-switch -Wno-ignored-attributes -Wno-deprecated-enum-enum-conversion)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
add_definitions(-DVK_NO_PROTOTYPES)
|
add_compile_definitions(VK_NO_PROTOTYPES)
|
||||||
|
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
|
|
||||||
@ -54,32 +55,29 @@ add_subdirectory(resource)
|
|||||||
add_subdirectory(asm)
|
add_subdirectory(asm)
|
||||||
|
|
||||||
if(PUBLIC_RELEASE)
|
if(PUBLIC_RELEASE)
|
||||||
add_executable(CemuBin WIN32
|
add_executable(CemuBin WIN32
|
||||||
main.cpp
|
main.cpp
|
||||||
mainLLE.cpp
|
mainLLE.cpp
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
add_executable(CemuBin
|
add_executable(CemuBin
|
||||||
main.cpp
|
main.cpp
|
||||||
mainLLE.cpp
|
mainLLE.cpp
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_precompile_headers(CemuBin PRIVATE Common/precompiled.h)
|
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_sources(CemuBin PRIVATE
|
target_sources(CemuBin PRIVATE
|
||||||
resource/cemu.rc
|
resource/cemu.rc
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set_property(TARGET CemuBin PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set_property(TARGET CemuBin PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
set_target_properties(CemuBin PROPERTIES
|
set_target_properties(CemuBin PROPERTIES
|
||||||
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_CURRENT_SOURCE_DIR}/../bin/
|
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/../bin/"
|
||||||
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_CURRENT_SOURCE_DIR}/../bin/
|
|
||||||
OUTPUT_NAME "Cemu"
|
OUTPUT_NAME "Cemu"
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(CemuBin PRIVATE
|
target_link_libraries(CemuBin PRIVATE
|
||||||
CemuAudio
|
CemuAudio
|
||||||
@ -90,12 +88,10 @@ target_link_libraries(CemuBin PRIVATE
|
|||||||
CemuGui
|
CemuGui
|
||||||
CemuInput
|
CemuInput
|
||||||
CemuUtil
|
CemuUtil
|
||||||
|
OpenGL::GL
|
||||||
|
SDL2::SDL2
|
||||||
)
|
)
|
||||||
|
|
||||||
target_link_libraries(CemuBin PRIVATE CemuAsm)
|
|
||||||
target_link_libraries(CemuBin PRIVATE SDL2::SDL2 SDL2::SDL2main) # is SDL2main needed?
|
|
||||||
target_link_libraries(CemuBin PRIVATE imguiImpl OpenGL::GL)
|
|
||||||
|
|
||||||
if (ENABLE_WXWIDGETS)
|
if (ENABLE_WXWIDGETS)
|
||||||
target_link_libraries(CemuBin PRIVATE wx::base wx::core)
|
target_link_libraries(CemuBin PRIVATE wx::base wx::core)
|
||||||
endif()
|
endif()
|
||||||
|
@ -16,8 +16,6 @@ endif()
|
|||||||
|
|
||||||
set_property(TARGET CemuCafe PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set_property(TARGET CemuCafe PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
target_precompile_headers(CemuCafe PRIVATE ../Common/precompiled.h)
|
|
||||||
|
|
||||||
target_include_directories(CemuCafe PUBLIC "../")
|
target_include_directories(CemuCafe PUBLIC "../")
|
||||||
|
|
||||||
target_link_libraries(CemuCafe PRIVATE
|
target_link_libraries(CemuCafe PRIVATE
|
||||||
|
@ -6,8 +6,6 @@ add_library(CemuComponents ${CPP_FILES} ${H_FILES})
|
|||||||
|
|
||||||
set_property(TARGET CemuComponents PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set_property(TARGET CemuComponents PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
target_precompile_headers(CemuComponents PRIVATE ../Common/precompiled.h)
|
|
||||||
|
|
||||||
target_include_directories(CemuComponents PUBLIC "../")
|
target_include_directories(CemuComponents PUBLIC "../")
|
||||||
|
|
||||||
target_link_libraries(CemuComponents PRIVATE
|
target_link_libraries(CemuComponents PRIVATE
|
||||||
@ -28,5 +26,5 @@ target_link_libraries(CemuComponents PRIVATE
|
|||||||
target_link_libraries(CemuComponents PUBLIC fmt::fmt)
|
target_link_libraries(CemuComponents PUBLIC fmt::fmt)
|
||||||
|
|
||||||
if(ENABLE_DISCORD_RPC)
|
if(ENABLE_DISCORD_RPC)
|
||||||
target_link_libraries(CemuComponents PRIVATE discord-rpc)
|
target_link_libraries(CemuComponents PRIVATE discord-rpc)
|
||||||
endif()
|
endif()
|
||||||
|
@ -7,12 +7,11 @@ add_library(CemuCommon ${CPP_FILES} ${H_FILES})
|
|||||||
set_property(TARGET CemuCommon PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set_property(TARGET CemuCommon PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_sources(CemuCommon
|
target_sources(CemuCommon PRIVATE
|
||||||
PRIVATE
|
|
||||||
windows/platform.cpp
|
windows/platform.cpp
|
||||||
windows/platform.h
|
windows/platform.h
|
||||||
ExceptionHandler/ExceptionHandler_win32.cpp
|
ExceptionHandler/ExceptionHandler_win32.cpp
|
||||||
)
|
)
|
||||||
else()
|
else()
|
||||||
target_sources(CemuCommon
|
target_sources(CemuCommon
|
||||||
PRIVATE
|
PRIVATE
|
||||||
@ -22,11 +21,12 @@ PRIVATE
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_sources(CemuCommon
|
target_sources(CemuCommon PRIVATE
|
||||||
PRIVATE
|
|
||||||
ExceptionHandler/ExceptionHandler.h
|
ExceptionHandler/ExceptionHandler.h
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# All the targets wanting to use the precompiled.h header
|
||||||
|
# have to link to CemuCommon
|
||||||
target_precompile_headers(CemuCommon PUBLIC precompiled.h)
|
target_precompile_headers(CemuCommon PUBLIC precompiled.h)
|
||||||
target_include_directories(CemuCommon PUBLIC "../")
|
target_include_directories(CemuCommon PUBLIC "../")
|
||||||
|
|
||||||
|
@ -1,43 +1,39 @@
|
|||||||
project(CemuAsm C)
|
project(CemuAsm C)
|
||||||
|
|
||||||
IF (WIN32)
|
if (WIN32)
|
||||||
|
|
||||||
enable_language(C ASM_MASM)
|
enable_language(C ASM_MASM)
|
||||||
|
|
||||||
add_library(CemuAsm
|
add_library(CemuAsm x64util_masm.asm)
|
||||||
x64util_masm.asm
|
set_source_files_properties(x64util_masm.asm PROPERTIES LANGUAGE ASM_MASM)
|
||||||
)
|
|
||||||
set_source_files_properties(x64util_masm.asm PROPERTIES LANGUAGE ASM_MASM)
|
|
||||||
|
|
||||||
# workaround for cr flag being passed to LINK.exe which considers it an input file and thus fails
|
# workaround for cr flag being passed to LINK.exe which considers it an input file and thus fails
|
||||||
# doesn't always seem to happen. The Windows CI builds were fine, but locally I would run into this problem
|
# doesn't always seem to happen. The Windows CI builds were fine, but locally I would run into this problem
|
||||||
# possibly related to https://gitlab.kitware.com/cmake/cmake/-/issues/18889
|
# possibly related to https://gitlab.kitware.com/cmake/cmake/-/issues/18889
|
||||||
set(CMAKE_ASM_MASM_CREATE_STATIC_LIBRARY "<CMAKE_AR> /OUT:<TARGET> <LINK_FLAGS> <OBJECTS>")
|
set(CMAKE_ASM_MASM_CREATE_STATIC_LIBRARY "<CMAKE_AR> /OUT:<TARGET> <LINK_FLAGS> <OBJECTS>")
|
||||||
|
|
||||||
ELSE()
|
else()
|
||||||
|
|
||||||
# NASM
|
# NASM
|
||||||
IF (APPLE)
|
if (APPLE)
|
||||||
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> -g -Fdwarf -f macho64 --prefix _ -o <OBJECT> <SOURCE>")
|
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> -g -Fdwarf -f macho64 --prefix _ -o <OBJECT> <SOURCE>")
|
||||||
ELSE()
|
else()
|
||||||
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> -g -Fdwarf -f elf64 -o <OBJECT> <SOURCE>")
|
set(CMAKE_ASM_NASM_COMPILE_OBJECT "<CMAKE_ASM_NASM_COMPILER> -g -Fdwarf -f elf64 -o <OBJECT> <SOURCE>")
|
||||||
ENDIF()
|
endif()
|
||||||
set(CMAKE_ASM_NASM_LINK_EXECUTABLE "ld <FLAGS> <CMAKE_ASM_NASM_LINK_FLAGS> <LINK_FLAGS> -fPIC <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
|
set(CMAKE_ASM_NASM_LINK_EXECUTABLE "ld <FLAGS> <CMAKE_ASM_NASM_LINK_FLAGS> <LINK_FLAGS> -fPIC <OBJECTS> -o <TARGET> <LINK_LIBRARIES>")
|
||||||
|
|
||||||
enable_language(C ASM_NASM)
|
enable_language(C ASM_NASM)
|
||||||
|
|
||||||
add_library(CemuAsm
|
add_library(CemuAsm x64util_nasm.asm)
|
||||||
x64util_nasm.asm
|
set_source_files_properties(x64util_nasm.asm PROPERTIES LANGUAGE ASM_NASM)
|
||||||
)
|
|
||||||
set_source_files_properties(x64util_nasm.asm PROPERTIES LANGUAGE ASM_NASM)
|
|
||||||
|
|
||||||
IF (APPLE)
|
if (APPLE)
|
||||||
set_target_properties(CemuAsm PROPERTIES NASM_OBJ_FORMAT macho64)
|
set_target_properties(CemuAsm PROPERTIES NASM_OBJ_FORMAT macho64)
|
||||||
ELSE()
|
else()
|
||||||
set_target_properties(CemuAsm PROPERTIES NASM_OBJ_FORMAT elf64)
|
set_target_properties(CemuAsm PROPERTIES NASM_OBJ_FORMAT elf64)
|
||||||
ENDIF()
|
endif()
|
||||||
set_target_properties(CemuAsm PROPERTIES LINKER_LANGUAGE C)
|
set_target_properties(CemuAsm PROPERTIES LINKER_LANGUAGE C)
|
||||||
|
|
||||||
ENDIF()
|
endif()
|
||||||
|
|
||||||
set_property(TARGET CemuAsm PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set_property(TARGET CemuAsm PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
project(CemuAudio)
|
project(CemuAudio)
|
||||||
|
|
||||||
add_library(CemuAudio
|
add_library(CemuAudio
|
||||||
IAudioAPI.cpp
|
IAudioAPI.cpp
|
||||||
IAudioAPI.h
|
IAudioAPI.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set_property(TARGET CemuAudio PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set_property(TARGET CemuAudio PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
@ -29,14 +29,18 @@ if(ENABLE_CUBEB)
|
|||||||
CubebAPI.cpp
|
CubebAPI.cpp
|
||||||
CubebAPI.h
|
CubebAPI.h
|
||||||
)
|
)
|
||||||
#add_definitions(HAS_CUBEB)
|
#add_compile_definitions(HAS_CUBEB)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_precompile_headers(CemuAudio PRIVATE ../Common/precompiled.h)
|
|
||||||
|
|
||||||
target_include_directories(CemuAudio PUBLIC "../")
|
target_include_directories(CemuAudio PUBLIC "../")
|
||||||
|
|
||||||
target_link_libraries(CemuAudio PRIVATE CemuCafe CemuConfig CemuGui CemuUtil)
|
target_link_libraries(CemuAudio PRIVATE
|
||||||
|
CemuCafe
|
||||||
|
CemuCommon
|
||||||
|
CemuConfig
|
||||||
|
CemuGui
|
||||||
|
CemuUtil
|
||||||
|
)
|
||||||
|
|
||||||
if(ENABLE_CUBEB)
|
if(ENABLE_CUBEB)
|
||||||
# PUBLIC because cubeb.h/cubeb.h is included in CubebAPI.h
|
# PUBLIC because cubeb.h/cubeb.h is included in CubebAPI.h
|
||||||
|
@ -6,8 +6,6 @@ add_library(CemuConfig ${CPP_FILES} ${H_FILES})
|
|||||||
|
|
||||||
set_property(TARGET CemuConfig PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set_property(TARGET CemuConfig PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
target_precompile_headers(CemuConfig PRIVATE ../Common/precompiled.h)
|
|
||||||
|
|
||||||
target_include_directories(CemuConfig PUBLIC "../")
|
target_include_directories(CemuConfig PUBLIC "../")
|
||||||
|
|
||||||
target_link_libraries(CemuConfig PRIVATE
|
target_link_libraries(CemuConfig PRIVATE
|
||||||
|
@ -7,14 +7,12 @@ add_library(CemuGui ${CPP_FILES} ${H_FILES})
|
|||||||
set_property(TARGET CemuGui PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set_property(TARGET CemuGui PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
target_sources(CemuGui PRIVATE
|
target_sources(CemuGui PRIVATE
|
||||||
wxcomponents/checkedlistctrl.cpp
|
wxcomponents/checkedlistctrl.cpp
|
||||||
wxcomponents/checkedlistctrl.h
|
wxcomponents/checkedlistctrl.h
|
||||||
wxcomponents/checktree.cpp
|
wxcomponents/checktree.cpp
|
||||||
wxcomponents/checktree.h
|
wxcomponents/checktree.h
|
||||||
)
|
)
|
||||||
|
|
||||||
target_precompile_headers(CemuGui PRIVATE ../Common/precompiled.h)
|
|
||||||
|
|
||||||
target_include_directories(CemuGui PUBLIC "../")
|
target_include_directories(CemuGui PUBLIC "../")
|
||||||
# PUBLIC because rapidjson/document.h is included in ChecksumTool.h
|
# PUBLIC because rapidjson/document.h is included in ChecksumTool.h
|
||||||
target_include_directories(CemuGui PUBLIC ${RAPIDJSON_INCLUDE_DIRS})
|
target_include_directories(CemuGui PUBLIC ${RAPIDJSON_INCLUDE_DIRS})
|
||||||
|
@ -13,8 +13,6 @@ target_sources(imguiImpl PRIVATE
|
|||||||
imgui_extension.h
|
imgui_extension.h
|
||||||
)
|
)
|
||||||
|
|
||||||
target_precompile_headers(imguiImpl PRIVATE ../Common/precompiled.h)
|
|
||||||
|
|
||||||
target_include_directories(imguiImpl PUBLIC "../")
|
target_include_directories(imguiImpl PUBLIC "../")
|
||||||
|
|
||||||
target_link_libraries(imguiImpl PRIVATE
|
target_link_libraries(imguiImpl PRIVATE
|
||||||
|
@ -1,98 +1,96 @@
|
|||||||
project(CemuInput)
|
project(CemuInput)
|
||||||
|
|
||||||
add_library(CemuInput
|
add_library(CemuInput
|
||||||
InputManager.cpp
|
InputManager.cpp
|
||||||
InputManager.h
|
InputManager.h
|
||||||
ControllerFactory.cpp
|
ControllerFactory.cpp
|
||||||
ControllerFactory.h
|
ControllerFactory.h
|
||||||
api/ControllerState.h
|
api/ControllerState.h
|
||||||
api/Controller.cpp
|
api/Controller.cpp
|
||||||
api/Controller.h
|
api/Controller.h
|
||||||
api/ControllerState.cpp
|
api/ControllerState.cpp
|
||||||
api/InputAPI.h
|
api/InputAPI.h
|
||||||
api/ControllerProvider.h
|
api/ControllerProvider.h
|
||||||
emulated/ProController.cpp
|
emulated/ProController.cpp
|
||||||
emulated/EmulatedController.h
|
emulated/EmulatedController.h
|
||||||
emulated/EmulatedController.cpp
|
emulated/EmulatedController.cpp
|
||||||
emulated/ProController.h
|
emulated/ProController.h
|
||||||
emulated/WPADController.cpp
|
emulated/WPADController.cpp
|
||||||
emulated/WPADController.h
|
emulated/WPADController.h
|
||||||
emulated/WiimoteController.h
|
emulated/WiimoteController.h
|
||||||
emulated/VPADController.cpp
|
emulated/VPADController.cpp
|
||||||
emulated/WiimoteController.cpp
|
emulated/WiimoteController.cpp
|
||||||
emulated/VPADController.h
|
emulated/VPADController.h
|
||||||
emulated/ClassicController.cpp
|
emulated/ClassicController.cpp
|
||||||
emulated/ClassicController.h
|
emulated/ClassicController.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set_property(TARGET CemuInput PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set_property(TARGET CemuInput PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
# SDL
|
# SDL
|
||||||
target_sources(CemuInput PRIVATE
|
target_sources(CemuInput PRIVATE
|
||||||
api/SDL/SDLController.cpp
|
api/SDL/SDLController.cpp
|
||||||
api/SDL/SDLControllerProvider.cpp
|
api/SDL/SDLControllerProvider.cpp
|
||||||
api/SDL/SDLController.h
|
api/SDL/SDLController.h
|
||||||
api/SDL/SDLControllerProvider.h
|
api/SDL/SDLControllerProvider.h
|
||||||
)
|
)
|
||||||
|
|
||||||
# DSU
|
# DSU
|
||||||
target_sources(CemuInput PRIVATE
|
target_sources(CemuInput PRIVATE
|
||||||
api/DSU/DSUController.h
|
api/DSU/DSUController.h
|
||||||
api/DSU/DSUControllerProvider.cpp
|
api/DSU/DSUControllerProvider.cpp
|
||||||
api/DSU/DSUController.cpp
|
api/DSU/DSUController.cpp
|
||||||
api/DSU/DSUControllerProvider.h
|
api/DSU/DSUControllerProvider.h
|
||||||
api/DSU/DSUMessages.h
|
api/DSU/DSUMessages.h
|
||||||
api/DSU/DSUMessages.cpp
|
api/DSU/DSUMessages.cpp
|
||||||
)
|
)
|
||||||
|
|
||||||
# Keyboard controller
|
# Keyboard controller
|
||||||
target_sources(CemuInput PRIVATE
|
target_sources(CemuInput PRIVATE
|
||||||
api/Keyboard/KeyboardControllerProvider.h
|
api/Keyboard/KeyboardControllerProvider.h
|
||||||
api/Keyboard/KeyboardControllerProvider.cpp
|
api/Keyboard/KeyboardControllerProvider.cpp
|
||||||
api/Keyboard/KeyboardController.cpp
|
api/Keyboard/KeyboardController.cpp
|
||||||
api/Keyboard/KeyboardController.h
|
api/Keyboard/KeyboardController.h
|
||||||
)
|
)
|
||||||
|
|
||||||
# Native gamecube
|
# Native gamecube
|
||||||
target_sources(CemuInput PRIVATE
|
target_sources(CemuInput PRIVATE
|
||||||
api/GameCube/GameCubeController.cpp
|
api/GameCube/GameCubeController.cpp
|
||||||
api/GameCube/GameCubeControllerProvider.h
|
api/GameCube/GameCubeControllerProvider.h
|
||||||
api/GameCube/GameCubeControllerProvider.cpp
|
api/GameCube/GameCubeControllerProvider.cpp
|
||||||
api/GameCube/GameCubeController.h
|
api/GameCube/GameCubeController.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
# Native wiimote (Win32 only for now)
|
# Native wiimote (Win32 only for now)
|
||||||
target_sources(CemuInput PRIVATE
|
target_sources(CemuInput PRIVATE
|
||||||
api/Wiimote/WiimoteControllerProvider.h
|
api/Wiimote/WiimoteControllerProvider.h
|
||||||
api/Wiimote/windows/WinWiimoteDevice.cpp
|
api/Wiimote/windows/WinWiimoteDevice.cpp
|
||||||
api/Wiimote/windows/WinWiimoteDevice.h
|
api/Wiimote/windows/WinWiimoteDevice.h
|
||||||
api/Wiimote/WiimoteControllerProvider.cpp
|
api/Wiimote/WiimoteControllerProvider.cpp
|
||||||
api/Wiimote/WiimoteMessages.h
|
api/Wiimote/WiimoteMessages.h
|
||||||
api/Wiimote/NativeWiimoteController.h
|
api/Wiimote/NativeWiimoteController.h
|
||||||
api/Wiimote/NativeWiimoteController.cpp
|
api/Wiimote/NativeWiimoteController.cpp
|
||||||
api/Wiimote/WiimoteDevice.h
|
api/Wiimote/WiimoteDevice.h
|
||||||
)
|
)
|
||||||
|
|
||||||
# XInput
|
# XInput
|
||||||
target_sources(CemuInput PRIVATE
|
target_sources(CemuInput PRIVATE
|
||||||
api/XInput/XInputControllerProvider.cpp
|
api/XInput/XInputControllerProvider.cpp
|
||||||
api/XInput/XInputControllerProvider.h
|
api/XInput/XInputControllerProvider.h
|
||||||
api/XInput/XInputController.cpp
|
api/XInput/XInputController.cpp
|
||||||
api/XInput/XInputController.h
|
api/XInput/XInputController.h
|
||||||
)
|
)
|
||||||
|
|
||||||
# DirectInput
|
# DirectInput
|
||||||
target_sources(CemuInput PRIVATE
|
target_sources(CemuInput PRIVATE
|
||||||
api/DirectInput/DirectInputControllerProvider.cpp
|
api/DirectInput/DirectInputControllerProvider.cpp
|
||||||
api/DirectInput/DirectInputController.h
|
api/DirectInput/DirectInputController.h
|
||||||
api/DirectInput/DirectInputControllerProvider.h
|
api/DirectInput/DirectInputControllerProvider.h
|
||||||
api/DirectInput/DirectInputController.cpp
|
api/DirectInput/DirectInputController.cpp
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_precompile_headers(CemuInput PRIVATE ../Common/precompiled.h)
|
|
||||||
|
|
||||||
target_include_directories(CemuInput PUBLIC "../")
|
target_include_directories(CemuInput PUBLIC "../")
|
||||||
|
|
||||||
target_link_libraries(CemuInput PRIVATE
|
target_link_libraries(CemuInput PRIVATE
|
||||||
|
@ -2,8 +2,6 @@ add_library(CemuResource)
|
|||||||
|
|
||||||
set_property(TARGET CemuResource PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set_property(TARGET CemuResource PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
target_precompile_headers(CemuResource PRIVATE ../Common/precompiled.h)
|
|
||||||
|
|
||||||
# icon resources
|
# icon resources
|
||||||
if(UNIX)
|
if(UNIX)
|
||||||
target_sources(CemuResource PRIVATE
|
target_sources(CemuResource PRIVATE
|
||||||
@ -12,10 +10,8 @@ if(UNIX)
|
|||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
target_sources(CemuResource PRIVATE
|
target_sources(CemuResource PRIVATE CafeDefaultFont.cpp)
|
||||||
CafeDefaultFont.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
target_include_directories(CemuResource PUBLIC "../")
|
target_include_directories(CemuResource PUBLIC "../")
|
||||||
|
|
||||||
target_link_libraries(CemuResource PRIVATE CemuComponents)
|
target_link_libraries(CemuResource PRIVATE CemuCommon CemuComponents)
|
||||||
|
@ -7,8 +7,6 @@ add_library(CemuUtil ${CPP_FILES} ${H_FILES})
|
|||||||
|
|
||||||
set_property(TARGET CemuUtil PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set_property(TARGET CemuUtil PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
target_precompile_headers(CemuUtil PRIVATE ../Common/precompiled.h)
|
|
||||||
|
|
||||||
target_include_directories(CemuUtil PUBLIC "../")
|
target_include_directories(CemuUtil PUBLIC "../")
|
||||||
|
|
||||||
target_link_libraries(CemuUtil PRIVATE
|
target_link_libraries(CemuUtil PRIVATE
|
||||||
|
Loading…
Reference in New Issue
Block a user