mirror of
https://github.com/cemu-project/Cemu.git
synced 2024-11-22 09:09:18 +01:00
Merge pull request #112 from Tachi107/build-minor-fixes
build: minor refactoring and fixes
This commit is contained in:
commit
4ed38a28b9
@ -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,20 +29,21 @@ 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)
|
if (PUBLIC_RELEASE)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc")
|
message(STATUS "Using additional optimization flags for MSVC")
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /fp:precise") # floating point model: precise
|
add_compile_options(/Oi /Ot) # enable intrinsic functions, favor speed
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /GT") # fiber safe optimizations
|
endif()
|
||||||
if (PUBLIC_RELEASE)
|
|
||||||
message(STATUS "Using additional optimization flags for MSVC")
|
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /Oi /Ot") # enable intrinsic functions, favor speed
|
|
||||||
endif()
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
option(ENABLE_OPENGL "Enables the OpenGL backend" ON)
|
option(ENABLE_OPENGL "Enables the OpenGL backend" ON)
|
||||||
@ -57,16 +52,16 @@ option(ENABLE_DISCORD_RPC "Enables the Discord Rich Presence feature" ON)
|
|||||||
|
|
||||||
# input backends
|
# input backends
|
||||||
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)
|
||||||
|
|
||||||
# audio backends
|
# audio backends
|
||||||
if (WIN32)
|
if (WIN32)
|
||||||
option(ENABLE_DIRECTAUDIO "Enables the directaudio backend" ON)
|
option(ENABLE_DIRECTAUDIO "Enables the directaudio backend" ON)
|
||||||
option(ENABLE_XAUDIO "Enables the xaudio backend" ON)
|
option(ENABLE_XAUDIO "Enables the xaudio backend" ON)
|
||||||
endif()
|
endif()
|
||||||
option(ENABLE_CUBEB "Enabled cubeb backend" ON)
|
option(ENABLE_CUBEB "Enabled cubeb backend" ON)
|
||||||
|
|
||||||
@ -99,17 +94,17 @@ if (UNIX AND NOT APPLE)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_VULKAN)
|
if (ENABLE_VULKAN)
|
||||||
include_directories("dependencies/Vulkan-Headers/include")
|
include_directories("dependencies/Vulkan-Headers/include")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_OPENGL)
|
if (ENABLE_OPENGL)
|
||||||
find_package(OpenGL REQUIRED)
|
find_package(OpenGL REQUIRED)
|
||||||
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()
|
||||||
|
|
||||||
if (ENABLE_WXWIDGETS)
|
if (ENABLE_WXWIDGETS)
|
||||||
|
@ -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
|
message( FATAL_ERROR "Pointers are not 64bit" )
|
||||||
else()
|
|
||||||
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
|
||||||
else()
|
VK_USE_PLATFORM_METAL_EXT
|
||||||
add_definitions(-DVK_USE_PLATFORM_XLIB_KHR) # legacy. Do we need to support XLIB surfaces?
|
)
|
||||||
add_definitions(-DVK_USE_PLATFORM_XCB_KHR)
|
else()
|
||||||
endif()
|
add_compile_definitions(
|
||||||
add_definitions(-maes)
|
VK_USE_PLATFORM_XLIB_KHR # legacy. Do we need to support XLIB surfaces?
|
||||||
# warnings
|
VK_USE_PLATFORM_XCB_KHR
|
||||||
if(CMAKE_C_COMPILER_ID MATCHES "Clang")
|
)
|
||||||
add_compile_options(-Wno-ambiguous-reversed-operator)
|
endif()
|
||||||
endif()
|
add_compile_options(-maes)
|
||||||
|
# warnings
|
||||||
|
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
|
||||||
|
add_compile_options(-Wno-ambiguous-reversed-operator)
|
||||||
|
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()
|
||||||
|
@ -12,8 +12,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,42 +1,46 @@
|
|||||||
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>")
|
||||||
|
|
||||||
# move these to UI folder
|
# move these to UI folder
|
||||||
target_sources(CemuAudio PRIVATE
|
target_sources(CemuAudio PRIVATE
|
||||||
audioDebuggerWindow.cpp
|
audioDebuggerWindow.cpp
|
||||||
audioDebuggerWindow.h
|
audioDebuggerWindow.h
|
||||||
)
|
)
|
||||||
|
|
||||||
if(WIN32)
|
if(WIN32)
|
||||||
target_sources(CemuAudio PRIVATE
|
target_sources(CemuAudio PRIVATE
|
||||||
DirectSoundAPI.cpp
|
DirectSoundAPI.cpp
|
||||||
DirectSoundAPI.h
|
DirectSoundAPI.h
|
||||||
XAudio2API.cpp
|
XAudio2API.cpp
|
||||||
XAudio2API.h
|
XAudio2API.h
|
||||||
XAudio27API.cpp
|
XAudio27API.cpp
|
||||||
XAudio27API.h
|
XAudio27API.h
|
||||||
)
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(ENABLE_CUBEB)
|
if(ENABLE_CUBEB)
|
||||||
target_sources(CemuAudio PRIVATE
|
target_sources(CemuAudio PRIVATE
|
||||||
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})
|
||||||
|
@ -5,16 +5,14 @@ add_library(imguiImpl)
|
|||||||
set_property(TARGET imguiImpl PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
set_property(TARGET imguiImpl PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||||
|
|
||||||
target_sources(imguiImpl PRIVATE
|
target_sources(imguiImpl PRIVATE
|
||||||
imgui_impl_opengl3.cpp
|
imgui_impl_opengl3.cpp
|
||||||
imgui_impl_opengl3.h
|
imgui_impl_opengl3.h
|
||||||
imgui_impl_vulkan.cpp
|
imgui_impl_vulkan.cpp
|
||||||
imgui_impl_vulkan.h
|
imgui_impl_vulkan.h
|
||||||
imgui_extension.cpp
|
imgui_extension.cpp
|
||||||
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,20 +2,16 @@ 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
|
||||||
embedded/resources.cpp
|
embedded/resources.cpp
|
||||||
embedded/resources.h
|
embedded/resources.h
|
||||||
)
|
)
|
||||||
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