NEW/BREAKING: provide general targets JKQTPlotter5/6::JKQTPlotter5/6, JKQTPlotter5/6::JKQTMathText5/6, ... which are independent of the type of build (shared/static)
NEW/BREAKING: refactor CMake-Code, so static/dynamic switch is done via <code>BUILD_SHARED_LIBS</code>, which retires <code>JKQtPlotter_BUILD_STATIC_LIBS</code>, <code>JKQtPlotter_BUILD_SHARED_LIBS</code> and removes the capability to build static and shared libraries in one location (fixes issue #104)
NEW: prepareed library for CMake's <a href="https://cmake.org/cmake/help/latest/module/FetchContent.html">FetchContent</a>-API
NEW: the different sub-libraries JKQTPlotter, JKQTFastPlotter (DEPRECATED), JKQTMath, JKQTMathText can be activated/deactivated with CMake options JKQtPlotter_BUILD_LIB_JKQTPLOTTER, JKQtPlotter_BUILD_LIB_JKQTFASTPLOTTER, JKQtPlotter_BUILD_LIB_JKQTMATHTEXT, JKQtPlotter_BUILD_LIB_JKQTMATH
2024-01-16 20:05:52 +08:00
|
|
|
if(NOT DEFINED BUILD_SHARED_LIBS)
|
|
|
|
option(BUILD_SHARED_LIBS "Build as shared library" ON)
|
2019-11-18 22:59:06 +08:00
|
|
|
endif()
|
|
|
|
if(NOT DEFINED JKQtPlotter_BUILD_INCLUDE_XITS_FONTS)
|
|
|
|
option(JKQtPlotter_BUILD_INCLUDE_XITS_FONTS "Include XITS fonts (SIL OPEN FONT LICENSE Version 1.1) as resources in library" ON)
|
|
|
|
endif()
|
2022-09-01 20:36:34 +08:00
|
|
|
if(NOT DEFINED JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS)
|
|
|
|
option(JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS "Include Fira Math fonts (SIL OPEN FONT LICENSE Version 1.1) as resources in library" ON)
|
|
|
|
endif()
|
2019-11-18 22:59:06 +08:00
|
|
|
if(NOT DEFINED JKQtPlotter_BUILD_DECORATE_LIBNAMES_WITH_BUILDTYPE)
|
|
|
|
option(JKQtPlotter_BUILD_DECORATE_LIBNAMES_WITH_BUILDTYPE "If set, the build-type (debug/release/...) is appended to the library name" ON)
|
|
|
|
endif()
|
|
|
|
if(NOT DEFINED JKQtPlotter_BUILD_EXAMPLES)
|
2022-08-08 00:00:05 +08:00
|
|
|
option(JKQtPlotter_BUILD_EXAMPLES "Build the examples" ON)
|
|
|
|
endif()
|
NEW/BREAKING: provide general targets JKQTPlotter5/6::JKQTPlotter5/6, JKQTPlotter5/6::JKQTMathText5/6, ... which are independent of the type of build (shared/static)
NEW/BREAKING: refactor CMake-Code, so static/dynamic switch is done via <code>BUILD_SHARED_LIBS</code>, which retires <code>JKQtPlotter_BUILD_STATIC_LIBS</code>, <code>JKQtPlotter_BUILD_SHARED_LIBS</code> and removes the capability to build static and shared libraries in one location (fixes issue #104)
NEW: prepareed library for CMake's <a href="https://cmake.org/cmake/help/latest/module/FetchContent.html">FetchContent</a>-API
NEW: the different sub-libraries JKQTPlotter, JKQTFastPlotter (DEPRECATED), JKQTMath, JKQTMathText can be activated/deactivated with CMake options JKQtPlotter_BUILD_LIB_JKQTPLOTTER, JKQtPlotter_BUILD_LIB_JKQTFASTPLOTTER, JKQtPlotter_BUILD_LIB_JKQTMATHTEXT, JKQtPlotter_BUILD_LIB_JKQTMATH
2024-01-16 20:05:52 +08:00
|
|
|
if(NOT DEFINED JKQtPlotter_BUILD_LIB_JKQTMATH)
|
|
|
|
option(JKQtPlotter_BUILD_LIB_JKQTMATH "Build the sub-library JKQTMath" ON)
|
|
|
|
endif()
|
|
|
|
if(NOT DEFINED JKQtPlotter_BUILD_LIB_JKQTMATHTEXT)
|
|
|
|
option(JKQtPlotter_BUILD_LIB_JKQTMATHTEXT "Build the sub-library JKQTMathText" ON)
|
|
|
|
endif()
|
|
|
|
if(NOT DEFINED JKQtPlotter_BUILD_LIB_JKQTFASTPLOTTER)
|
|
|
|
option(JKQtPlotter_BUILD_LIB_JKQTFASTPLOTTER "Build the sub-library JKQTFastPlotter" ON)
|
|
|
|
endif()
|
|
|
|
if(NOT DEFINED JKQtPlotter_BUILD_LIB_JKQTPLOTTER)
|
|
|
|
option(JKQtPlotter_BUILD_LIB_JKQTPLOTTER "Build the sub-library JKQTPlotter" ON)
|
|
|
|
endif()
|
2022-08-08 00:00:05 +08:00
|
|
|
if(NOT DEFINED JKQtPlotter_BUILD_TOOLS)
|
|
|
|
option(JKQtPlotter_BUILD_TOOLS "Build the tools" ON)
|
2019-11-18 22:59:06 +08:00
|
|
|
endif()
|
2024-01-22 04:58:56 +08:00
|
|
|
if(NOT DEFINED JKQtPlotter_BUILD_TESTS)
|
|
|
|
option(JKQtPlotter_BUILD_TESTS "Build the unit tests" ON)
|
|
|
|
endif()
|
2022-07-19 05:33:20 +08:00
|
|
|
if(NOT DEFINED JKQtPlotter_BUILD_FORCE_NO_PRINTER_SUPPORT)
|
|
|
|
option(JKQtPlotter_BUILD_FORCE_NO_PRINTER_SUPPORT "Build the library with printer support switched off, even if it is available" OFF)
|
|
|
|
endif()
|
2022-07-23 03:41:07 +08:00
|
|
|
if(NOT DEFINED JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
2022-07-23 14:21:31 +08:00
|
|
|
option(JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS "Build the library using precompiled headers to improve compile speed" ON)
|
2022-07-23 03:41:07 +08:00
|
|
|
endif()
|
2024-01-09 00:14:03 +08:00
|
|
|
if(NOT DEFINED JKQtPlotter_BUILD_WITH_TIMING_INFO_OUTPUT)
|
|
|
|
option(JKQtPlotter_BUILD_WITH_TIMING_INFO_OUTPUT "Build the library to output extra timing information using Debug()" OFF)
|
|
|
|
endif()
|
2022-09-28 06:59:57 +08:00
|
|
|
if(NOT DEFINED JKQtPlotter_ENABLED_CXX20)
|
|
|
|
option(JKQtPlotter_ENABLED_CXX20 "Build the library using C++20" OFF)
|
|
|
|
endif()
|
2019-11-18 22:59:06 +08:00
|
|
|
if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
|
|
|
option(CMAKE_INSTALL_PREFIX "Install directory" ${CMAKE_CURRENT_SOURCE_DIR}/install)
|
|
|
|
endif()
|
|
|
|
|
NEW/BREAKING: provide general targets JKQTPlotter5/6::JKQTPlotter5/6, JKQTPlotter5/6::JKQTMathText5/6, ... which are independent of the type of build (shared/static)
NEW/BREAKING: refactor CMake-Code, so static/dynamic switch is done via <code>BUILD_SHARED_LIBS</code>, which retires <code>JKQtPlotter_BUILD_STATIC_LIBS</code>, <code>JKQtPlotter_BUILD_SHARED_LIBS</code> and removes the capability to build static and shared libraries in one location (fixes issue #104)
NEW: prepareed library for CMake's <a href="https://cmake.org/cmake/help/latest/module/FetchContent.html">FetchContent</a>-API
NEW: the different sub-libraries JKQTPlotter, JKQTFastPlotter (DEPRECATED), JKQTMath, JKQTMathText can be activated/deactivated with CMake options JKQtPlotter_BUILD_LIB_JKQTPLOTTER, JKQtPlotter_BUILD_LIB_JKQTFASTPLOTTER, JKQtPlotter_BUILD_LIB_JKQTMATHTEXT, JKQtPlotter_BUILD_LIB_JKQTMATH
2024-01-16 20:05:52 +08:00
|
|
|
include(GNUInstallDirs)
|
2019-11-18 22:59:06 +08:00
|
|
|
|
|
|
|
#evaluate the settings above
|
|
|
|
if (NOT CMAKE_INSTALL_LIBDIR)
|
|
|
|
set(CMAKE_INSTALL_LIBDIR "lib")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NOT CMAKE_INSTALL_BINDIR)
|
|
|
|
set(CMAKE_INSTALL_BINDIR "bin")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (NOT CMAKE_INSTALL_INCLUDEDIR)
|
|
|
|
set(CMAKE_INSTALL_INCLUDEDIR "include")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
# place all DLLs and EXEs in the subdirectory output of the top level directory of the build tree
|
2020-10-02 21:40:47 +08:00
|
|
|
set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/output)
|
|
|
|
set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/output)
|
2019-11-18 22:59:06 +08:00
|
|
|
|
|
|
|
|
|
|
|
if(JKQtPlotter_BUILD_DECORATE_LIBNAMES_WITH_BUILDTYPE)
|
NEW/BREAKING: provide general targets JKQTPlotter5/6::JKQTPlotter5/6, JKQTPlotter5/6::JKQTMathText5/6, ... which are independent of the type of build (shared/static)
NEW/BREAKING: refactor CMake-Code, so static/dynamic switch is done via <code>BUILD_SHARED_LIBS</code>, which retires <code>JKQtPlotter_BUILD_STATIC_LIBS</code>, <code>JKQtPlotter_BUILD_SHARED_LIBS</code> and removes the capability to build static and shared libraries in one location (fixes issue #104)
NEW: prepareed library for CMake's <a href="https://cmake.org/cmake/help/latest/module/FetchContent.html">FetchContent</a>-API
NEW: the different sub-libraries JKQTPlotter, JKQTFastPlotter (DEPRECATED), JKQTMath, JKQTMathText can be activated/deactivated with CMake options JKQtPlotter_BUILD_LIB_JKQTPLOTTER, JKQtPlotter_BUILD_LIB_JKQTFASTPLOTTER, JKQtPlotter_BUILD_LIB_JKQTMATHTEXT, JKQtPlotter_BUILD_LIB_JKQTMATH
2024-01-16 20:05:52 +08:00
|
|
|
set(JKQtPlotter_LIBNAME_ADDITION "_$<CONFIG>")
|
2019-11-18 22:59:06 +08:00
|
|
|
else()
|
|
|
|
set(JKQtPlotter_LIBNAME_ADDITION )
|
|
|
|
endif()
|
2022-07-23 19:59:23 +08:00
|
|
|
|
NEW/BREAKING: provide general targets JKQTPlotter5/6::JKQTPlotter5/6, JKQTPlotter5/6::JKQTMathText5/6, ... which are independent of the type of build (shared/static)
NEW/BREAKING: refactor CMake-Code, so static/dynamic switch is done via <code>BUILD_SHARED_LIBS</code>, which retires <code>JKQtPlotter_BUILD_STATIC_LIBS</code>, <code>JKQtPlotter_BUILD_SHARED_LIBS</code> and removes the capability to build static and shared libraries in one location (fixes issue #104)
NEW: prepareed library for CMake's <a href="https://cmake.org/cmake/help/latest/module/FetchContent.html">FetchContent</a>-API
NEW: the different sub-libraries JKQTPlotter, JKQTFastPlotter (DEPRECATED), JKQTMath, JKQTMathText can be activated/deactivated with CMake options JKQtPlotter_BUILD_LIB_JKQTPLOTTER, JKQtPlotter_BUILD_LIB_JKQTFASTPLOTTER, JKQtPlotter_BUILD_LIB_JKQTMATHTEXT, JKQtPlotter_BUILD_LIB_JKQTMATH
2024-01-16 20:05:52 +08:00
|
|
|
if (JKQtPlotter_BUILD_FORCE_NO_PRINTER_SUPPORT)
|
|
|
|
set(JKQtPlotter_BUILD_WITH_PRINTER_SUPPORT "OFF")
|
|
|
|
else()
|
|
|
|
set(JKQtPlotter_BUILD_WITH_PRINTER_SUPPORT "ON")
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if(JKQtPlotter_BUILD_LIB_JKQTPLOTTER)
|
|
|
|
set(JKQtPlotter_BUILD_LIB_JKQTMATH "ON")
|
|
|
|
set(JKQtPlotter_BUILD_LIB_JKQTMATHTEXT "ON")
|
|
|
|
endif()
|