Skip to content

Commit

Permalink
Merge pull request wang-bin#1307 from cgilles/master
Browse files Browse the repository at this point in the history
Add new CMake option to be able to disable QML interface
  • Loading branch information
wang-bin authored May 20, 2020
2 parents 11a13bf 04a2bba commit f2aef97
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 25,7 @@ option(BUILD_EXAMPLES "Build examples" ON)
option(BUILD_PLAYERS "Build players" ON)
option(BUILD_TESTS "Build tests" ON)
option(BUILD_QT5OPENGL "Build with Qt5 OpenGL module" ON)
option(BUILD_QML "Build QML interfaces" ON)

list(APPEND CMAKE_FIND_ROOT_PATH ${QTDIR})

Expand Down Expand Up @@ -116,13 117,17 @@ if(CMAKE_GENERATOR MATCHES "Visual Studio.*")
endif()

add_subdirectory(src)

find_package(Qt5Widgets)
if(Qt5Widgets_FOUND)
add_subdirectory(widgets)
endif()
find_package(Qt5 COMPONENTS Qml Quick)
if(Qt5Qml_FOUND AND Qt5Quick_FOUND)
add_subdirectory(qml)

if(BUILD_QML)
find_package(Qt5 COMPONENTS Qml Quick)
if(Qt5Qml_FOUND AND Qt5Quick_FOUND)
add_subdirectory(qml)
endif()
endif()

if(BUILD_EXAMPLES OR BUILD_PLAYERS)
Expand Down

0 comments on commit f2aef97

Please sign in to comment.