1 cmake_minimum_required(VERSION 3.5)
3 project(bigintmandel VERSION 0.1 LANGUAGES CXX)
9 set(CMAKE_CXX_STANDARD 11)
10 set(CMAKE_CXX_STANDARD_REQUIRED ON)
12 find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets Concurrent)
13 find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets Concurrent)
23 if(${QT_VERSION_MAJOR} GREATER_EQUAL 6)
24 qt_add_executable(bigintmandel
28 # Define target properties for Android with Qt 6 as:
29 # set_property(TARGET bigintmandel APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR
30 # ${CMAKE_CURRENT_SOURCE_DIR}/android)
31 # For more information, see https://doc.qt.io/qt-6/qt-add-executable.html#target-creation
34 add_library(bigintmandel SHARED
37 # Define properties for Android with Qt 5 after find_package() calls as:
38 # set(ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android")
40 add_executable(bigintmandel
46 target_link_libraries(
49 Qt${QT_VERSION_MAJOR}::Widgets
50 Qt${QT_VERSION_MAJOR}::Concurrent
54 # Qt for iOS sets MACOSX_BUNDLE_GUI_IDENTIFIER automatically since Qt 6.1.
55 # If you are developing for iOS or macOS you should consider setting an
56 # explicit, fixed bundle identifier manually though.
57 if(${QT_VERSION} VERSION_LESS 6.1.0)
58 set(BUNDLE_ID_OPTION MACOSX_BUNDLE_GUI_IDENTIFIER com.example.bigintmandel)
60 set_target_properties(bigintmandel PROPERTIES
62 MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
63 MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
68 include(GNUInstallDirs)
69 install(TARGETS bigintmandel
71 LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
72 RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
75 if(QT_VERSION_MAJOR EQUAL 6)
76 qt_finalize_executable(bigintmandel)