11cmake_minimum_required (VERSION 3.12)
22
3- project (MediaCopier VERSION 2.2.3 )
3+ project (MediaCopier VERSION 2.3.0 )
44
55set (CMAKE_CXX_STANDARD 17)
66set (CMAKE_CXX_STANDARD_REQUIRED ON )
77set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2" )
88set (CMAKE_POSITION_INDEPENDENT_CODE ON )
99
10+ option (SKIP_GUI "Don't build graphical user interface" OFF )
11+ option (SKIP_CLI "Don't build command line interface" OFF )
12+ option (SKIP_KDE "Don't build KDE Plasma integration" OFF )
13+ option (USE_QT5 "Build against Qt5 libraries (legacy)" OFF )
14+ option (ENABLE_TEST "Enable test targets" OFF )
15+ option (ENABLE_TEST_COVERAGE "Enable test and coverage targets" OFF )
16+ option (INSTALL_DEV_FILES "Install library headers and cmake targets" OFF )
17+
1018if (${MSVC} )
1119 # range-v3 library needs permissive ruleset when compiled with MSVC
1220 # https://github.com/ericniebler/range-v3#supported-compilers
@@ -27,32 +35,24 @@ if(${MSVC})
2735 set (CLI_TARGET_FLAGS WIN32 )
2836endif ()
2937
30- option (ENABLE_CLI "Build cli tool" ON )
31- option (ENABLE_QT "Build Qt5 based graphical user interface" OFF )
32- option (ENABLE_QT6 "Build Qt6 based graphical user interface" OFF )
33- option (ENABLE_KDE "Enable KDE Plasma integration for graphical user interface" OFF )
34- option (ENABLE_TEST "Enable test targets" OFF )
35- option (ENABLE_TEST_COVERAGE "Enable test and coverage targets" OFF )
36- option (INSTALL_DEV_FILES "Install library headers and cmake targets" OFF )
37-
3838set (MEDIACOPIER_CORE_LIB libmediacopier-core)
3939set (MEDIACOPIER_UI_LIB libmediacopier-ui)
4040
4141add_subdirectory (lib/core)
4242
43- if (${ENABLE_CLI} )
44- add_subdirectory (app/mediacopier-cli)
45- endif ()
46-
47- if (${ENABLE_QT} OR ${ENABLE_QT6} OR ${ENABLE_KDE} )
43+ if (NOT ${SKIP_GUI} OR NOT ${SKIP_KDE} )
4844 add_subdirectory (lib/ui)
4945endif ()
5046
51- if (${ENABLE_QT} OR ${ENABLE_QT6 } )
47+ if (NOT ${SKIP_GUI } )
5248 add_subdirectory (app/mediacopier)
5349endif ()
5450
55- if (${ENABLE_KDE} )
51+ if (NOT ${SKIP_CLI} )
52+ add_subdirectory (app/mediacopier-cli)
53+ endif ()
54+
55+ if (NOT ${SKIP_KDE} )
5656 add_subdirectory (app/mediacopier-plasma)
5757endif ()
5858
0 commit comments