From 0d366a5790184f70fd1fbd6e66c2a7ef1b4583a0 Mon Sep 17 00:00:00 2001 From: Anthony Bilinski Date: Sat, 19 Mar 2022 11:11:16 -0700 Subject: [PATCH] chore(build): Enable all warnings on qTox libraries as well warnings interface was only being linked to qtox_static, so were not being applied to e.g. util. Link it to each library as well as qtox_static so that they all inherit all the warnings. --- CMakeLists.txt | 2 +- audio/CMakeLists.txt | 1 + test/mock/CMakeLists.txt | 3 ++- util/CMakeLists.txt | 1 + 4 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 3c86b9bb4..7d8051e0c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -626,10 +626,10 @@ target_link_libraries(${PROJECT_NAME}_static ${ALL_LIBRARIES} coverage_config) +target_link_libraries(${PROJECT_NAME}_static qtox::warnings) target_link_libraries(${PROJECT_NAME}_static util_library) target_link_libraries(${PROJECT_NAME}_static audio_library) target_link_libraries(${PROJECT_NAME}_static translations_library) -target_link_libraries(${PROJECT_NAME}_static qtox::warnings) add_executable(${PROJECT_NAME} WIN32 diff --git a/audio/CMakeLists.txt b/audio/CMakeLists.txt index 9d659e579..7a0356b20 100644 --- a/audio/CMakeLists.txt +++ b/audio/CMakeLists.txt @@ -38,3 +38,4 @@ target_include_directories(audio_library PUBLIC include/) target_link_libraries(audio_library util_library) target_link_libraries(audio_library Qt5::Core) target_link_libraries(audio_library ${OPENAL_LIBRARIES}) +target_link_libraries(audio_library qtox::warnings) diff --git a/test/mock/CMakeLists.txt b/test/mock/CMakeLists.txt index 0468a59b4..b483eb730 100644 --- a/test/mock/CMakeLists.txt +++ b/test/mock/CMakeLists.txt @@ -29,4 +29,5 @@ target_link_libraries(mock_library util_library Qt5::Core Qt5::Network - Qt5::Gui) + Qt5::Gui + qtox::warnings) diff --git a/util/CMakeLists.txt b/util/CMakeLists.txt index a3d86ca42..e8c58455e 100644 --- a/util/CMakeLists.txt +++ b/util/CMakeLists.txt @@ -27,3 +27,4 @@ add_library(util_library STATIC # We need this directory, and users of our library will need it too target_include_directories(util_library PUBLIC include/) target_link_libraries(util_library PRIVATE Qt5::Core) +target_link_libraries(util_library PRIVATE qtox::warnings)