From 74b02513e36063dabcd8c3b38d18285176406913 Mon Sep 17 00:00:00 2001 From: OmniTroid Date: Thu, 5 Jan 2023 08:10:30 +0100 Subject: [PATCH] Cmake fixes (#885) * Add required macos frameworks * Make building tests optional * Add missing source and header files from cmakelists --- CMakeLists.txt | 8 +++++++- include/CMakeLists.txt | 2 ++ src/CMakeLists.txt | 3 +++ 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d7714b..fad3de0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,13 @@ target_link_libraries(Attorney_Online PRIVATE Qt5::Core Qt5::Gui Qt5::Network Qt Qt5::WebSockets bass bassmidi bassopus discord-rpc) target_compile_definitions(Attorney_Online PRIVATE DISCORD) +if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") + target_link_libraries(Attorney_Online PRIVATE "-framework CoreFoundation" "-framework Foundation" "-framework CoreServices") +endif() + # Subdirectories -add_subdirectory(test) +if (AO_BUILD_TESTS) + add_subdirectory(test) +endif() add_subdirectory(src) add_subdirectory(include) diff --git a/include/CMakeLists.txt b/include/CMakeLists.txt index a46afbc..29ad4fe 100644 --- a/include/CMakeLists.txt +++ b/include/CMakeLists.txt @@ -6,6 +6,7 @@ aocaseannouncerdialog.h aocharbutton.h aoclocklabel.h aoemotebutton.h +aoemotepreview.h aoevidencebutton.h aoevidencedisplay.h aoimage.h @@ -15,6 +16,7 @@ aooptionsdialog.h aopacket.h aosfxplayer.h aotextarea.h +aoutils.h bass.h bassmidi.h bassopus.h diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 32e924a..297a4f4 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -6,15 +6,18 @@ aocaseannouncerdialog.cpp aocharbutton.cpp aoclocklabel.cpp aoemotebutton.cpp +aoemotepreview.cpp aoevidencebutton.cpp aoevidencedisplay.cpp aoimage.cpp aolayer.cpp aomusicplayer.cpp aooptionsdialog.cpp +aoclocklabel.cpp aopacket.cpp aosfxplayer.cpp aotextarea.cpp +aoutils.cpp charselect.cpp chatlogpiece.cpp courtroom.cpp