mirror of
https://github.com/cemu-project/Cemu.git
synced 2025-07-07 15:31:18 +12: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
13 changed files with 208 additions and 235 deletions
|
@ -1,42 +1,46 @@
|
|||
project(CemuAudio)
|
||||
|
||||
add_library(CemuAudio
|
||||
IAudioAPI.cpp
|
||||
IAudioAPI.h
|
||||
IAudioAPI.cpp
|
||||
IAudioAPI.h
|
||||
)
|
||||
|
||||
set_property(TARGET CemuAudio PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
|
||||
|
||||
# move these to UI folder
|
||||
target_sources(CemuAudio PRIVATE
|
||||
audioDebuggerWindow.cpp
|
||||
audioDebuggerWindow.h
|
||||
audioDebuggerWindow.cpp
|
||||
audioDebuggerWindow.h
|
||||
)
|
||||
|
||||
if(WIN32)
|
||||
target_sources(CemuAudio PRIVATE
|
||||
DirectSoundAPI.cpp
|
||||
DirectSoundAPI.h
|
||||
XAudio2API.cpp
|
||||
XAudio2API.h
|
||||
XAudio27API.cpp
|
||||
XAudio27API.h
|
||||
)
|
||||
target_sources(CemuAudio PRIVATE
|
||||
DirectSoundAPI.cpp
|
||||
DirectSoundAPI.h
|
||||
XAudio2API.cpp
|
||||
XAudio2API.h
|
||||
XAudio27API.cpp
|
||||
XAudio27API.h
|
||||
)
|
||||
endif()
|
||||
|
||||
if(ENABLE_CUBEB)
|
||||
target_sources(CemuAudio PRIVATE
|
||||
CubebAPI.cpp
|
||||
CubebAPI.h
|
||||
)
|
||||
#add_definitions(HAS_CUBEB)
|
||||
target_sources(CemuAudio PRIVATE
|
||||
CubebAPI.cpp
|
||||
CubebAPI.h
|
||||
)
|
||||
#add_compile_definitions(HAS_CUBEB)
|
||||
endif()
|
||||
|
||||
target_precompile_headers(CemuAudio PRIVATE ../Common/precompiled.h)
|
||||
|
||||
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)
|
||||
# PUBLIC because cubeb.h/cubeb.h is included in CubebAPI.h
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue