diff --git a/CMakeLists.txt b/CMakeLists.txt index c003de847..9f3be98b8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -396,13 +396,13 @@ else() option(USE_BUNDLE "Bundle dependencies" OFF) endif() -if (USE_BUNDLE AND NOT USE_BUNDLE_DIR) -if(LINUX) - set(USE_BUNDLE_DIR "../plugins") -endif(LINUX) -if(APPLE) - set(USE_BUNDLE_DIR "../PlugIns") -endif(APPLE) +if(USE_BUNDLE AND NOT USE_BUNDLE_DIR) + if(LINUX) + set(USE_BUNDLE_DIR "../plugins") + endif(LINUX) + if(APPLE) + set(USE_BUNDLE_DIR "../PlugIns") + endif(APPLE) endif(USE_BUNDLE AND NOT USE_BUNDLE_DIR) if(NOT CMAKE_CROSSCOMPILING) @@ -470,13 +470,9 @@ if(GTest_FOUND AND GMOCK_LIBRARY AND QtTest_LIBRARIES) endif() # Uninstall support -configure_file( - "${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" - "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" - IMMEDIATE @ONLY) +configure_file("${CMAKE_CURRENT_SOURCE_DIR}/cmake_uninstall.cmake.in" "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake" IMMEDIATE @ONLY) -add_custom_target(uninstall - "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") +add_custom_target(uninstall "${CMAKE_COMMAND}" -P "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake") # Show a summary of what we have enabled summary_show() diff --git a/ext/libstrawberry-common/CMakeLists.txt b/ext/libstrawberry-common/CMakeLists.txt index 72134f9eb..445514d12 100644 --- a/ext/libstrawberry-common/CMakeLists.txt +++ b/ext/libstrawberry-common/CMakeLists.txt @@ -20,23 +20,21 @@ else() qt5_wrap_cpp(MOC ${HEADERS}) endif() -link_directories( - ${GLIB_LIBRARY_DIRS} -) +link_directories(${GLIB_LIBRARY_DIRS}) add_library(libstrawberry-common STATIC ${SOURCES} ${MOC}) -target_include_directories(libstrawberry-common SYSTEM PRIVATE - ${GLIB_INCLUDE_DIRS} -) - +target_include_directories(libstrawberry-common SYSTEM PRIVATE ${GLIB_INCLUDE_DIRS}) target_include_directories(libstrawberry-common PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR} - ${CMAKE_SOURCE_DIR}/src ${CMAKE_BINARY_DIR}/src ) +if(Backtrace_FOUND) + target_include_directories(libstrawberry-common SYSTEM PRIVATE ${Backtrace_INCLUDE_DIRS}) +endif(Backtrace_FOUND) + target_link_libraries(libstrawberry-common PRIVATE ${CMAKE_THREAD_LIBS_INIT} ${GLIB_LIBRARIES} @@ -45,6 +43,5 @@ target_link_libraries(libstrawberry-common PRIVATE ) if(Backtrace_FOUND) - target_include_directories(libstrawberry-common PRIVATE ${Backtrace_INCLUDE_DIRS}) target_link_libraries(libstrawberry-common PRIVATE ${Backtrace_LIBRARIES}) endif(Backtrace_FOUND)