diff --git a/.travis.yml b/.travis.yml index a13e8eb9f..58fffd142 100644 --- a/.travis.yml +++ b/.travis.yml @@ -133,6 +133,8 @@ script: - mkdir build - cd build - export PKG_CONFIG_PATH="$CUSTOM_BREAKPAD_PREFIX/lib/pkgconfig:$CUSTOM_PYTHON_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH" + - export QT_QPA_PLATFORM_PATH=$Qt5_ROOT/plugins + - export QT_QPA_PLATFORM=minimal - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then if [[ "$BUILD_SYSTEM" == "qmake" ]]; then qmake diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index a4832528d..cce8e3b1e 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -167,6 +167,9 @@ set_target_properties(Cutter PROPERTIES ENABLE_EXPORTS ON MACOSX_BUNDLE_INFO_PLIST "${CMAKE_CURRENT_SOURCE_DIR}/macos/Info.plist") target_link_libraries(Cutter CutterLib) +if(CUTTER_ENABLE_TESTS) + add_subdirectory(test) +endif() if (TARGET Graphviz::GVC) target_link_libraries(CutterLib Graphviz::GVC) @@ -184,6 +187,10 @@ if(CUTTER_ENABLE_CRASH_REPORTS) include_directories("${BREAKPAD_FRAMEWORK_DIR}/Breakpad.framework/Headers") set_target_properties(Cutter PROPERTIES LINK_FLAGS "-Wl,-F${BREAKPAD_FRAMEWORK_DIR}") target_link_libraries(Cutter "-framework Breakpad") + if(CUTTER_ENABLE_TESTS) + set_target_properties(CutterTest PROPERTIES LINK_FLAGS "-Wl,-F${BREAKPAD_FRAMEWORK_DIR}") + target_link_libraries(CutterTest "-framework Breakpad") + endif() else() find_package(Breakpad REQUIRED) include_directories(${BREAKPAD_INCLUDE_DIRS}) @@ -219,7 +226,3 @@ if(TARGET KF5::SyntaxHighlighting) target_link_libraries(CutterLib KF5::SyntaxHighlighting) target_compile_definitions(CutterLib PRIVATE CUTTER_ENABLE_KSYNTAXHIGHLIGHTING) endif() - -if(CUTTER_ENABLE_TESTS) - add_subdirectory(test) -endif()