JKQtPlotter/lib/CMakeLists.txt
jkriege2 b0df7a1fd7 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 13:07:08 +01:00

103 lines
4.2 KiB
CMake

cmake_minimum_required(VERSION 3.23)
message( STATUS )
message( STATUS "=============================================================================" )
message( STATUS "== JKQTPlotterLib Build Information ==" )
message( STATUS "=============================================================================" )
message( STATUS "Version: ${PROJECT_VERSION}")
message( STATUS "Build type: ${CMAKE_BUILD_TYPE}")
message( STATUS "Build types: ${CMAKE_CONFIGURATION_TYPES}")
message( STATUS "Build shared lib: ${BUILD_SHARED_LIBS}")
message( STATUS "Using CMake: ${CMAKE_VERSION}")
message( STATUS "Using CMake Generator: ${CMAKE_GENERATOR}")
message( STATUS "Using compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}, platform: ${CMAKE_CXX_PLATFORM_ID}" )
message( STATUS "C++ Standard: C++ ${JKQtPlotter_QT_CXX_STANDARD}, required: ${JKQtPlotter_QT_CXX_STANDARD_REQUIRED}" )
message( STATUS "LIB-Architecture: CXX: ${CMAKE_CXX_LIBRARY_ARCHITECTURE} / BASE: ${CMAKE_LIBRARY_ARCHITECTURE}" )
message( STATUS "bit depth: ${JKQtPlotter_BIT_DEPTH} bit" )
message( STATUS "System Name: ${CMAKE_SYSTEM_NAME}" )
message( STATUS "Processor Name: ${CMAKE_SYSTEM_PROCESSOR}" )
message( STATUS "Using Qt: ${QT_VERSION}" )
message( STATUS " [at ${QT_DIR}]" )
if(JKQtPlotter_BUILD_INCLUDE_XITS_FONTS)
message( STATUS "XITS fonts: LINKED IN" )
else()
message( STATUS "XITS fonts: NOT AVAILABLE IN LIB" )
endif(JKQtPlotter_BUILD_INCLUDE_XITS_FONTS)
if(JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS)
message( STATUS "FIRA fonts: LINKED IN" )
else()
message( STATUS "FIRA fonts: NOT AVAILABLE IN LIB" )
endif(JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS)
if(${JKQtPlotter_HAS_NO_PRINTER_SUPPORT})
message( STATUS "Print support: OFF" )
else()
message( STATUS "Print support: ON" )
endif()
if(${JKQtPlotter_BUILD_WITH_TIMING_INFO_OUTPUT})
message( STATUS "Timing Info output: OFF" )
else()
message( STATUS "Timing Info output: ON" )
endif()
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
message( STATUS "Precompiled Header: ON" )
else()
message( STATUS "Precompiled Header: OFF")
endif()
if (JKQtPlotter_BUILD_LIB_JKQTMATH)
message( STATUS "build JKQTMath: ON" )
else()
message( STATUS "build JKQTMath: OFF")
endif()
if (JKQtPlotter_BUILD_LIB_JKQTMATHTEXT)
message( STATUS "build JKQTMathText: ON" )
else()
message( STATUS "build JKQTMathText: OFF")
endif()
if (JKQtPlotter_BUILD_LIB_JKQTFASTPLOTTER)
message( STATUS "build JKQTFastPlotter: ON" )
else()
message( STATUS "build JKQTFastPlotter: OFF")
endif()
if (JKQtPlotter_BUILD_LIB_JKQTPLOTTER)
message( STATUS "build JKQTPlotter: ON" )
else()
message( STATUS "build JKQTPlotter: OFF")
endif()
message( STATUS "Installing to: ${CMAKE_INSTALL_PREFIX}" )
message( STATUS "=============================================================================" )
message( STATUS )
message( STATUS )
message( STATUS "............................................................................." )
message( STATUS ".. BUILDING LIBRARIES" )
message( STATUS "............................................................................." )
set(JKQTPLOTTER_VERSION_FILE_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(JKQTPLOTTER_VERSION_FILE ${JKQTPLOTTER_VERSION_FILE_DIR}/jkqtplotter_version.h)
configure_file(${CMAKE_CURRENT_LIST_DIR}/jkqtplotter_version.h.in ${JKQTPLOTTER_VERSION_FILE})
include_directories(.)
# this library is the base for ALL other libraries, so it is always built!
add_subdirectory(jkqtcommon)
# all other libraries are built only, when activated by CMake options
if (JKQtPlotter_BUILD_LIB_JKQTMATH)
add_subdirectory(jkqtmath)
endif()
if (JKQtPlotter_BUILD_LIB_JKQTMATHTEXT)
add_subdirectory(jkqtmathtext)
endif()
if (JKQtPlotter_BUILD_LIB_JKQTFASTPLOTTER)
add_subdirectory(jkqtfastplotter)
endif()
if (JKQtPlotter_BUILD_LIB_JKQTPLOTTER)
add_subdirectory(jkqtplotter)
endif()