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:
Andrea Pappacoda 2022-09-01 14:46:56 +02:00
parent b1e92f1779
commit 719ee90b27
No known key found for this signature in database
GPG key ID: 4A9208A2455077A7
13 changed files with 208 additions and 235 deletions

View file

@ -2,20 +2,16 @@ add_library(CemuResource)
set_property(TARGET CemuResource PROPERTY MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>")
target_precompile_headers(CemuResource PRIVATE ../Common/precompiled.h)
# icon resources
if(UNIX)
target_sources(CemuResource PRIVATE
embedded/resources.cpp
embedded/resources.h
)
target_sources(CemuResource PRIVATE
embedded/resources.cpp
embedded/resources.h
)
endif()
target_sources(CemuResource PRIVATE
CafeDefaultFont.cpp
)
target_sources(CemuResource PRIVATE CafeDefaultFont.cpp)
target_include_directories(CemuResource PUBLIC "../")
target_link_libraries(CemuResource PRIVATE CemuComponents)
target_link_libraries(CemuResource PRIVATE CemuCommon CemuComponents)