Skip to content
This repository has been archived by the owner on May 3, 2019. It is now read-only.

Commit

Permalink
Try to fix some build issues on obs
Browse files Browse the repository at this point in the history
  • Loading branch information
ColinDuquesnoy committed Jan 14, 2018
1 parent 5faba06 commit d969abc
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ set_option(STATIC_LIBSTDCPP OFF BOOL "True to link statically with libstdc++ and
set_option(UPDATE_TRANSLATIONS OFF BOOL "True to update translations")
set_option(DEFAULT_THEME "Adaptive" STRING "The default theme (available: Default, Midna, MidnaDark, Breeze, BreezeDark, Deezer, Spotify,...)")
set_option(USE_PRECOMPILED_HEADER ON BOOL "(GNU/Linux Only) ON to enable usage of pre-compiled headers. Default is ON")
set_option(CHECK_QML_SYNTAX OFF BOOL "Whether to check for QML/Javascript syntax errors. Default is ON")
if (UNIX)
set_option(USE_LD_GOLD ON BOOL "Use GNU gold linker")
endif()
Expand Down
4 changes: 2 additions & 2 deletions scripts/travis/commit-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ pushd build;

if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
# build
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DENABLE_COVERAGE=ON -DCMAKE_INSTALL_PREFIX=/usr ..;
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DENABLE_COVERAGE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCHECK_QML_SYNTAX=ON ..;
make -j2;

# run tests
Expand All @@ -21,7 +21,7 @@ fi

if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# build
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON ..;
cmake -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTS=ON -DCHECK_QML_SYNTAX=ON ..;
make -j2;

# run tests
Expand Down
4 changes: 2 additions & 2 deletions scripts/travis/full-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pushd build;

if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
# build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=/usr ..;
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DCMAKE_INSTALL_PREFIX=/usr -DCHECK_QML_SYNTAX=ON ..;
make -j2;

# run all tests
Expand All @@ -28,7 +28,7 @@ fi

if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
# build
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON ..;
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=ON -DCHECK_QML_SYNTAX=ON ..;
make -j2;

# run all tests
Expand Down
7 changes: 3 additions & 4 deletions src/imports/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,14 @@ file(GLOB_RECURSE OTHER_FILES "*.qrc" ".cmake" "qmldir")

# automatically update imports.qrc and MellowPlayer/qmldir
add_custom_target(update_imports COMMAND ${CMAKE_COMMAND} -P UpdateImports.cmake
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR})
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DEPENDS ${SOURCE_FILES})

# automatically check for syntax errors in qml and js files
find_program(QMLLINT qmllint)
if (QMLLINT)
if (CHECK_QML_SYNTAX AND QMLLINT)
message(STATUS "Found qmllint: ${QMLLINT}")
add_custom_target(check_qml_syntax COMMAND ${QMLLINT} ${SOURCE_FILES})
add_dependencies(update_imports check_qml_syntax)
endif()

add_library(${LIB_NAME} ${SOURCE_FILES} ${OTHER_FILES})
add_dependencies(${LIB_NAME} update_imports)
target_link_libraries(${LIB_NAME} Qt5::Core)

0 comments on commit d969abc

Please sign in to comment.