mirror of
https://github.com/jkriege2/JKQtPlotter.git
synced 2024-11-15 10:05:47 +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
This commit is contained in:
parent
7402343279
commit
b0df7a1fd7
@ -45,20 +45,31 @@ include(jkqtplotter_common_qtsettings)
|
|||||||
# additionnal common macros
|
# additionnal common macros
|
||||||
include(jkqtplotter_macros)
|
include(jkqtplotter_macros)
|
||||||
|
|
||||||
|
set(jkqtplotter_LIBNAME_VERSION_PART ${QT_VERSION_MAJOR})
|
||||||
|
# defines the CMake-namespace for all libraries
|
||||||
|
set(jkqtplotter_namespace JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART}::)
|
||||||
|
# defines the subdirectory for CMake-files, when installing
|
||||||
|
set(jkqtplotter_cmakeSubdir JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# now add subdirectories with the library code ...
|
# now add subdirectories with the library code ...
|
||||||
add_subdirectory(lib)
|
add_subdirectory(lib)
|
||||||
# ... and optionally the examples
|
|
||||||
if(JKQtPlotter_BUILD_EXAMPLES)
|
if(CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
||||||
add_subdirectory(examples)
|
# We're in the root, define additional targets for developers.
|
||||||
|
# This prepares the library to be used with CMake's FetchContent
|
||||||
|
|
||||||
|
# ... and optionally the examples
|
||||||
|
if(JKQtPlotter_BUILD_EXAMPLES)
|
||||||
|
add_subdirectory(examples)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(JKQtPlotter_BUILD_TOOLS)
|
||||||
|
add_subdirectory(tools)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
add_subdirectory(doc)
|
||||||
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_TOOLS)
|
|
||||||
add_subdirectory(tools)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
add_subdirectory(doc)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
14
README.md
14
README.md
@ -93,10 +93,22 @@ JKQTPlotter contains two different build systems: A modern [CMake](https://cmake
|
|||||||
With [CMake](https://cmake.org/) you can easily build JKQTPlotter and all its examples, by calling something like:
|
With [CMake](https://cmake.org/) you can easily build JKQTPlotter and all its examples, by calling something like:
|
||||||
```
|
```
|
||||||
$ mkdir build; cd build
|
$ mkdir build; cd build
|
||||||
$ cmake .. -G "<cmake_generator>" "-DCMAKE_PREFIX_PATH=<path_to_your_qt_sources>"
|
$ cmake .. -G "<cmake_generator>" "-DCMAKE_PREFIX_PATH=<path_to_your_qt_sources>" "-DCMAKE_INSTALL_PREFIX=<where_to_install>"
|
||||||
$ cmake --build . --config "Debug"
|
$ cmake --build . --config "Debug"
|
||||||
|
$ cmake --install . --config "Debug"
|
||||||
```
|
```
|
||||||
|
|
||||||
|
This will create CMake targets, which you can easily link against. For the main plotter library, the target's name is \c JKQTPlotter5::JKQTPlotter5 or \c JKQTPlotter6::JKQTPlotter6 depending on the Qt-Version you use. You can then simmply link against this via:
|
||||||
|
```
|
||||||
|
find_package(JKQTPlotter6 REQUIRED)
|
||||||
|
target_link_libraries(${PROJECT_NAME} JKQTPlotter6::JKQTPlotter6)
|
||||||
|
```
|
||||||
|
or on a Qt-version agnostic way via:
|
||||||
|
```
|
||||||
|
find_package(JKQTPlotter${QT_VERSION_MAJOR} REQUIRED)
|
||||||
|
target_link_libraries(${PROJECT_NAME} JKQTPlotter${QT_VERSION_MAJOR}::JKQTPlotter${QT_VERSION_MAJOR})
|
||||||
|
```
|
||||||
|
See http://jkriege2.github.io/JKQtPlotter/page_buildinstructions_cmake.html for details.
|
||||||
|
|
||||||
## Stargazers over time
|
## Stargazers over time
|
||||||
|
|
||||||
|
44
appveyor.yml
44
appveyor.yml
@ -121,17 +121,33 @@ for:
|
|||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- cmd: echo == BUILD JKQtPlotter ============================================================================
|
- cmd: echo == BUILD JKQtPlotter ============================================================================
|
||||||
|
- cmd: cd %APPVEYOR_BUILD_FOLDER%
|
||||||
- cmd: mkdir build
|
- cmd: mkdir build
|
||||||
|
- cmd: mkdir install
|
||||||
- cmd: cd build
|
- cmd: cd build
|
||||||
- cmd: if %USE_CMAKE%==true cmake --version
|
- cmd: if %USE_CMAKE%==true cmake --version
|
||||||
- cmd: if %USE_CMAKE%==true cmake -G "%CMAKE_GENERATOR%" "-DCMAKE_PREFIX_PATH=%QTDIR%;%CIMG_INCLUDE_DIR%" ..
|
- cmd: if %USE_CMAKE%==true cmake -G "%CMAKE_GENERATOR%" "-DCMAKE_PREFIX_PATH=%QTDIR%;%CIMG_INCLUDE_DIR%" "-DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%\install" ..
|
||||||
- cmd: if %USE_CMAKE%==true cmake --build . --config "%CONFIGURATION%" -j%NUMBER_OF_PROCESSORS% -- %CMAKE_BUILDFLAGS%
|
- cmd: if %USE_CMAKE%==true cmake --build . --config "%CONFIGURATION%" -j%NUMBER_OF_PROCESSORS% -- %CMAKE_BUILDFLAGS%
|
||||||
- cmd: if %USE_CMAKE%==false qmake.exe -v
|
- cmd: if %USE_CMAKE%==false qmake.exe -v
|
||||||
- cmd: if %USE_CMAKE%==false qmake.exe CONFIG+=%CONFIGURATION% ..\JKQtPlotterBuildAllExamples.pro
|
- cmd: if %USE_CMAKE%==false qmake.exe CONFIG+=%CONFIGURATION% ..\JKQtPlotterBuildAllExamples.pro
|
||||||
- cmd: if %USE_CMAKE%==false call %MAKETOOL%
|
- cmd: if %USE_CMAKE%==false call %MAKETOOL%
|
||||||
- cmd: cd ..
|
- cmd: cd ..
|
||||||
|
|
||||||
|
install:
|
||||||
|
- cmd: echo == INSTALL JKQtPlotter ==========================================================================
|
||||||
|
- cmd: cd %APPVEYOR_BUILD_FOLDER%
|
||||||
|
- cmd: cd build
|
||||||
|
- cmd: if %USE_CMAKE%==true cmake --install . --config "%CONFIGURATION%" -j%NUMBER_OF_PROCESSORS% -- %CMAKE_BUILDFLAGS%
|
||||||
|
|
||||||
|
test_usage:
|
||||||
|
- cmd: echo == TEST: USE JKQtPlotter CMAKE BUILD ============================================================
|
||||||
|
- cmd: if %USE_CMAKE%==true cd %APPVEYOR_BUILD_FOLDER%
|
||||||
|
- cmd: if %USE_CMAKE%==true cd examples\cmake_link_example
|
||||||
|
- cmd: mkdir build
|
||||||
|
- cmd: cd build
|
||||||
|
- cmd: if %USE_CMAKE%==true cmake -G "%CMAKE_GENERATOR%" "-DCMAKE_PREFIX_PATH=%QTDIR%;%CIMG_INCLUDE_DIR%;%APPVEYOR_BUILD_FOLDER%\install" ..
|
||||||
|
- cmd: if %USE_CMAKE%==true cmake --build . --config "%CONFIGURATION%" -j%NUMBER_OF_PROCESSORS% -- %CMAKE_BUILDFLAGS%
|
||||||
|
- cmd: cd ..
|
||||||
|
|
||||||
|
|
||||||
# Linux (Ubuntu2004)
|
# Linux (Ubuntu2004)
|
||||||
@ -185,13 +201,15 @@ for:
|
|||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- sh: echo == BUILD JKQtPlotter ============================================================================
|
- sh: echo == BUILD JKQtPlotter ============================================================================
|
||||||
|
- sh: cd %APPVEYOR_BUILD_FOLDER%
|
||||||
- sh: mkdir build
|
- sh: mkdir build
|
||||||
|
- sh: mkdir install
|
||||||
- sh: cd build
|
- sh: cd build
|
||||||
- sh: |
|
- sh: |
|
||||||
if [ "$USE_CMAKE" = true ]; then
|
if [ "$USE_CMAKE" = true ]; then
|
||||||
echo --- Run CMake Configure -----------------------------------------------------------------------------
|
echo --- Run CMake Configure -----------------------------------------------------------------------------
|
||||||
cmake --version
|
cmake --version
|
||||||
cmake -G "$CMAKE_GENERATOR" "-DCMAKE_PREFIX_PATH=$QTDIR;$CIMG_INCLUDE_DIR" ..
|
cmake -G "$CMAKE_GENERATOR" "-DCMAKE_PREFIX_PATH=$QTDIR;$CIMG_INCLUDE_DIR" "-DCMAKE_INSTALL_PREFIX=%APPVEYOR_BUILD_FOLDER%/install" ..
|
||||||
echo --- Build using CMake -------------------------------------------------------------------------------
|
echo --- Build using CMake -------------------------------------------------------------------------------
|
||||||
cmake --build . --config "$CONFIGURATION" -j$(getconf _NPROCESSORS_ONLN) -- $CMAKE_BUILDFLAGS
|
cmake --build . --config "$CONFIGURATION" -j$(getconf _NPROCESSORS_ONLN) -- $CMAKE_BUILDFLAGS
|
||||||
fi
|
fi
|
||||||
@ -204,8 +222,30 @@ for:
|
|||||||
make -j$(getconf _NPROCESSORS_ONLN)
|
make -j$(getconf _NPROCESSORS_ONLN)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
install:
|
||||||
|
- sh: echo == INSTALL JKQtPlotter ==========================================================================
|
||||||
|
- sh: cd %APPVEYOR_BUILD_FOLDER%
|
||||||
|
- sh: cd build
|
||||||
|
- sh: |
|
||||||
|
if [ "$USE_CMAKE" = true ]; then
|
||||||
|
echo --- Install using CMake -------------------------------------------------------------------------------
|
||||||
|
cmake --install . --config "$CONFIGURATION" -j$(getconf _NPROCESSORS_ONLN) -- $CMAKE_BUILDFLAGS
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
test_usage:
|
||||||
|
- sh: echo == TEST: USE JKQtPlotter CMAKE BUILD ============================================================
|
||||||
|
- sh: cd %APPVEYOR_BUILD_FOLDER%
|
||||||
|
- sh: if %USE_CMAKE%==true cd examples\cmake_link_example
|
||||||
|
- sh: mkdir build
|
||||||
|
- sh: cd build
|
||||||
|
- sh: |
|
||||||
|
if [ "$USE_CMAKE" = true ]; then
|
||||||
|
cmake -G "%CMAKE_GENERATOR%" "-DCMAKE_PREFIX_PATH=%QTDIR%;%CIMG_INCLUDE_DIR%;%APPVEYOR_BUILD_FOLDER%\install" ..
|
||||||
|
cmake --build . --config "%CONFIGURATION%" -j%NUMBER_OF_PROCESSORS% -- %CMAKE_BUILDFLAGS%
|
||||||
|
fi
|
||||||
|
- sh: cd ..
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# MacOS (Monterey)
|
# MacOS (Monterey)
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
if(NOT DEFINED JKQtPlotter_BUILD_SHARED_LIBS)
|
if(NOT DEFINED BUILD_SHARED_LIBS)
|
||||||
option(JKQtPlotter_BUILD_SHARED_LIBS "Build as shared library" ON)
|
option(BUILD_SHARED_LIBS "Build as shared library" ON)
|
||||||
endif()
|
|
||||||
if(NOT DEFINED JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
option(JKQtPlotter_BUILD_STATIC_LIBS "Build as static library" OFF)
|
|
||||||
endif()
|
endif()
|
||||||
if(NOT DEFINED JKQtPlotter_BUILD_INCLUDE_XITS_FONTS)
|
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)
|
option(JKQtPlotter_BUILD_INCLUDE_XITS_FONTS "Include XITS fonts (SIL OPEN FONT LICENSE Version 1.1) as resources in library" ON)
|
||||||
@ -16,6 +13,18 @@ endif()
|
|||||||
if(NOT DEFINED JKQtPlotter_BUILD_EXAMPLES)
|
if(NOT DEFINED JKQtPlotter_BUILD_EXAMPLES)
|
||||||
option(JKQtPlotter_BUILD_EXAMPLES "Build the examples" ON)
|
option(JKQtPlotter_BUILD_EXAMPLES "Build the examples" ON)
|
||||||
endif()
|
endif()
|
||||||
|
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()
|
||||||
if(NOT DEFINED JKQtPlotter_BUILD_TOOLS)
|
if(NOT DEFINED JKQtPlotter_BUILD_TOOLS)
|
||||||
option(JKQtPlotter_BUILD_TOOLS "Build the tools" ON)
|
option(JKQtPlotter_BUILD_TOOLS "Build the tools" ON)
|
||||||
endif()
|
endif()
|
||||||
@ -35,6 +44,7 @@ if(NOT DEFINED CMAKE_INSTALL_PREFIX)
|
|||||||
option(CMAKE_INSTALL_PREFIX "Install directory" ${CMAKE_CURRENT_SOURCE_DIR}/install)
|
option(CMAKE_INSTALL_PREFIX "Install directory" ${CMAKE_CURRENT_SOURCE_DIR}/install)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
#evaluate the settings above
|
#evaluate the settings above
|
||||||
if (NOT CMAKE_INSTALL_LIBDIR)
|
if (NOT CMAKE_INSTALL_LIBDIR)
|
||||||
@ -55,8 +65,18 @@ set (CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/output)
|
|||||||
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_DECORATE_LIBNAMES_WITH_BUILDTYPE)
|
if(JKQtPlotter_BUILD_DECORATE_LIBNAMES_WITH_BUILDTYPE)
|
||||||
set(JKQtPlotter_LIBNAME_ADDITION "_$<CONFIG>") #"_${CMAKE_BUILD_TYPE}")
|
set(JKQtPlotter_LIBNAME_ADDITION "_$<CONFIG>")
|
||||||
else()
|
else()
|
||||||
set(JKQtPlotter_LIBNAME_ADDITION )
|
set(JKQtPlotter_LIBNAME_ADDITION )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
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()
|
||||||
|
@ -1,3 +1,67 @@
|
|||||||
|
include(CMakePackageConfigHelpers)
|
||||||
|
|
||||||
|
function(jkqtplotter_add_library lib_name)
|
||||||
|
# create the library (SHARED/STATIC is controlled by the CMake option BUILD_SHARED_LIBS
|
||||||
|
add_library(${lib_name} )
|
||||||
|
# ... add an alias with the correct namespace
|
||||||
|
add_library(${jkqtplotter_namespace}${lib_name} ALIAS ${lib_name})
|
||||||
|
|
||||||
|
# set the libraries output name
|
||||||
|
set_property(TARGET ${lib_name} PROPERTY OUTPUT_NAME "${lib_name}${JKQtPlotter_LIBNAME_ADDITION}")
|
||||||
|
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function(jkqtplotter_setDefaultLibOptions TARGETNAME libBaseName PRECOMPHEADERFILE)
|
||||||
|
string(TOUPPER ${libBaseName} libBasenameUPPER)
|
||||||
|
|
||||||
|
# set library version
|
||||||
|
set_property(TARGET ${TARGETNAME} PROPERTY VERSION "${PROJECT_VERSION}")
|
||||||
|
# set required Cxx-Standard
|
||||||
|
set_property(TARGET ${TARGETNAME} PROPERTY CXX_STANDARD ${JKQtPlotter_QT_CXX_STANDARD})
|
||||||
|
set_property(TARGET ${TARGETNAME} PROPERTY CXX_STANDARD_REQUIRED ${JKQtPlotter_QT_CXX_STANDARD_REQUIRED})
|
||||||
|
target_compile_features(${TARGETNAME} PUBLIC ${JKQtPlotter_QT_CXX_COMPILE_FEATURE})
|
||||||
|
# set options, specific to shared libraries
|
||||||
|
if (BUILD_SHARED_LIBS)
|
||||||
|
target_compile_definitions(${TARGETNAME} PUBLIC ${libBasenameUPPER}_LIB_IN_DLL)
|
||||||
|
target_compile_definitions(${TARGETNAME} PRIVATE ${libBasenameUPPER}_LIB_EXPORT_LIBRARY)
|
||||||
|
set_target_properties(${TARGETNAME} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS "ON")
|
||||||
|
endif(BUILD_SHARED_LIBS)
|
||||||
|
|
||||||
|
if(MINGW)
|
||||||
|
# COMPILER-SETTINGS FOR MINGW
|
||||||
|
target_compile_options(${TARGETNAME} PUBLIC -fexceptions)
|
||||||
|
elseif(MSVC)
|
||||||
|
# COMPILER-SETTINGS FOR MS VISUAL C++
|
||||||
|
target_compile_options(${TARGETNAME} PUBLIC /EHsc)
|
||||||
|
target_compile_definitions(${TARGETNAME} PUBLIC NOMINMAX)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# enable TIMING INFO output (if activated by option JKQtPlotter_BUILD_WITH_TIMING_INFO_OUTPUT)
|
||||||
|
if(JKQtPlotter_BUILD_WITH_TIMING_INFO_OUTPUT)
|
||||||
|
target_compile_definitions(${TARGETNAME} PRIVATE JKQTBP_AUTOTIMER)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# set default include paths
|
||||||
|
target_include_directories(${TARGETNAME} PUBLIC
|
||||||
|
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/../>
|
||||||
|
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
||||||
|
)
|
||||||
|
|
||||||
|
# precomiled headers to speed up compilation
|
||||||
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS AND (NOT PRECOMPHEADERFILE EQUAL ""))
|
||||||
|
target_precompile_headers(${TARGETNAME} PRIVATE ${PRECOMPHEADERFILE})
|
||||||
|
target_sources(${TARGETNAME} PRIVATE ${PRECOMPHEADERFILE})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
endfunction()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
include(GNUInstallDirs)
|
||||||
|
|
||||||
function(jkqtplotter_installlibrary lib_name libIncludeSubdir BuildTypePart)
|
function(jkqtplotter_installlibrary lib_name libIncludeSubdir BuildTypePart)
|
||||||
install(TARGETS ${lib_name} EXPORT ${lib_name}_TARGETS
|
install(TARGETS ${lib_name} EXPORT ${lib_name}_TARGETS
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
@ -6,7 +70,6 @@ function(jkqtplotter_installlibrary lib_name libIncludeSubdir BuildTypePart)
|
|||||||
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
|
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
|
||||||
)
|
)
|
||||||
if(WIN32 AND MSVC AND (NOT MSVC_VERSION LESS 1600) AND (NOT CMAKE_VERSION VERSION_LESS "3.1") AND (NOT BuildTypePart STREQUAL ""))
|
if(WIN32 AND MSVC AND (NOT MSVC_VERSION LESS 1600) AND (NOT CMAKE_VERSION VERSION_LESS "3.1") AND (NOT BuildTypePart STREQUAL ""))
|
||||||
message(STATUS "?????????????? INSTALL PDF BuildTypePart=${BuildTypePart}")
|
|
||||||
install(FILES $<TARGET_PDB_FILE:${lib_name}> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
|
install(FILES $<TARGET_PDB_FILE:${lib_name}> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
|
||||||
endif()
|
endif()
|
||||||
set(JKQTP_CURRENT_TARGET_SHAREDPART "${BuildTypePart}")
|
set(JKQTP_CURRENT_TARGET_SHAREDPART "${BuildTypePart}")
|
||||||
@ -14,11 +77,57 @@ function(jkqtplotter_installlibrary lib_name libIncludeSubdir BuildTypePart)
|
|||||||
configure_file(LibTarget.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Config.cmake" @ONLY)
|
configure_file(LibTarget.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Config.cmake" @ONLY)
|
||||||
install(EXPORT ${lib_name}_TARGETS
|
install(EXPORT ${lib_name}_TARGETS
|
||||||
FILE "${JKQTP_CURRENT_TARGET_FILENAME}"
|
FILE "${JKQTP_CURRENT_TARGET_FILENAME}"
|
||||||
DESTINATION lib/cmake
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake
|
||||||
)
|
)
|
||||||
|
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake"
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake"
|
||||||
DESTINATION lib/cmake )
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake )
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Config.cmake"
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Config.cmake"
|
||||||
DESTINATION lib/cmake )
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake )
|
||||||
endfunction(jkqtplotter_installlibrary)
|
endfunction(jkqtplotter_installlibrary)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function(jkqtplotter_installlibrary_new lib_name libIncludeSubdir libSrcDir)
|
||||||
|
|
||||||
|
# export targets (including headers!)
|
||||||
|
install(TARGETS ${lib_name}
|
||||||
|
EXPORT ${lib_name}_TARGETS
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
|
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
|
||||||
|
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
|
||||||
|
FILE_SET HEADERS DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
|
||||||
|
)
|
||||||
|
# generate ...Config.cmake
|
||||||
|
set(JKQTP_CURRENT_TARGET_FILENAME "${lib_name}Targets.cmake")
|
||||||
|
configure_file(${libSrcDir}/LibTarget.cmake.in "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Config.cmake" @ONLY)
|
||||||
|
# install export files
|
||||||
|
install(EXPORT ${lib_name}_TARGETS
|
||||||
|
FILE "${JKQTP_CURRENT_TARGET_FILENAME}"
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${jkqtplotter_cmakeSubdir}
|
||||||
|
NAMESPACE ${jkqtplotter_namespace}
|
||||||
|
)
|
||||||
|
|
||||||
|
# write CMake version file
|
||||||
|
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake
|
||||||
|
VERSION ${PROJECT_VERSION}
|
||||||
|
COMPATIBILITY AnyNewerVersion )
|
||||||
|
|
||||||
|
#install PDB-files
|
||||||
|
if(WIN32 AND MSVC AND (NOT MSVC_VERSION LESS 1600) AND (NOT CMAKE_VERSION VERSION_LESS "3.1") AND BUILD_SHARED_LIBS)
|
||||||
|
install(FILES $<TARGET_PDB_FILE:${lib_name}> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# install ...Version.cmake
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake"
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${jkqtplotter_cmakeSubdir} )
|
||||||
|
# install ...Config.cmake
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Config.cmake"
|
||||||
|
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${jkqtplotter_cmakeSubdir} )
|
||||||
|
# install readme.txt
|
||||||
|
configure_file(${PROJECT_SOURCE_DIR}/readme.txt.in ${CMAKE_CURRENT_BINARY_DIR}/${lib_name}_Readme.txt @ONLY)
|
||||||
|
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${lib_name}_Readme.txt" DESTINATION ${CMAKE_INSTALL_DOCDIR} )
|
||||||
|
# install license
|
||||||
|
install(FILES "${PROJECT_SOURCE_DIR}/LICENSE" DESTINATION ${CMAKE_INSTALL_DOCDIR}) # RENAME "${lib_name}_LICENSE.txt" )
|
||||||
|
endfunction(jkqtplotter_installlibrary_new)
|
||||||
|
@ -7,135 +7,176 @@
|
|||||||
|
|
||||||
\section page_buildinstructions_CMAKE_RUN Running a Build with CMake
|
\section page_buildinstructions_CMAKE_RUN Running a Build with CMake
|
||||||
|
|
||||||
The preferred way to build JKQTPlotter is using <a href="https://cmake.org/">CMake</a>. You can find a detailed explanation of CMake at https://cliutils.gitlab.io/modern-cmake/. The CMake-build is defined in `CMakeLists.txt` files, found in many of the directories of the code repository. Especially in the root directory and the two subdirectories <code> ./lib/ </code> and <code> ./examples/ </code> .
|
The preferred way to build JKQTPlotter is using <a href="https://cmake.org/">CMake</a> (at least using version 3.23). You can find a detailed explanation of CMake at https://cliutils.gitlab.io/modern-cmake/. The CMake-build is defined in `CMakeLists.txt` files, found in many of the directories of the code repository. Especially in the root directory and the two subdirectories <code> ./lib/ </code> and <code> ./examples/ </code> .
|
||||||
|
|
||||||
You can build JKQTPlotter (and also the examples) by either opening the file <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/CMakeLists.txt">CMakeLists.txt</a> in QTCreator (which has CMake integration), or by calling \c CMake by hand. How to do this depends on your local system und build environment.
|
You can build JKQTPlotter (and also the examples) by either opening the file <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/CMakeLists.txt">CMakeLists.txt</a> in QTCreator (which has CMake integration), or by calling \c CMake by hand. How to do this depends on your local system und build environment.
|
||||||
|
|
||||||
|
|
||||||
\subsection page_buildinstructions_CMAKE_MAKEFILE Building with MinGW/GNU/... Makefiles
|
\subsection page_buildinstructions_CMAKE_MAKEFILE Generic Configuring&Building
|
||||||
|
|
||||||
You can use (MinGW) Makefiles by calling:
|
The first step is to configure the bild,using:
|
||||||
|
|
||||||
\code{.sh}
|
\code{.sh}
|
||||||
$ mkdir build
|
$ mkdir build
|
||||||
$ cd build
|
$ cd build
|
||||||
$ cmake .. -G "MinGW Makefiles" "-DCMAKE_PREFIX_PATH=<path_to_your_qt_sources>"
|
$ cmake .. -G "<GENERATOR>" "-DCMAKE_PREFIX_PATH=<path_to_your_qt_sources>"
|
||||||
$ cmake --build . --config "Debug"
|
|
||||||
$ cmake --build . --config "Debug" --target install
|
|
||||||
\endcode
|
\endcode
|
||||||
|
This configures the CMake build. The Parameter \c <GENERATOR> tells CMake, which build-file generator to use (e.g. use <code>MinGW Makefiles</code> for MinGW Makefiles on Windows or <code>Unix Makefiles</code> on Unix, see <a href="https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html">https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html</a> for a list of available generators). The parameter \c <path_to_your_qt_sources> should be the path to your Qt installation. You can also add (separated by semicolon) paths to other libraries that JKQTPlotter should use, e.g. <a href="https://cimg.eu/">CImg</a> or <a href="https://cimg.eu/">OpenCV</a>. JKQTPlotter does not have any neccessary dependencies, apart from Qt5 or 6, but it contains binding code to somme popular 3rd party libraries (as e.g. CImmg or OpenCV). Also see \ref page_buildinstructions_CMAKE_CONFIG for a listing of additional configuration options for JKQTPlotter. You might e.g. want to set \c CMAKE_INSTALL_PREFIX to a path in which you want to install the build results. This also has to be done at this stage.
|
||||||
|
|
||||||
\subsection page_buildinstructions_CMAKE_VSTUDIO Building with Visual Studio
|
Of course you can also perform this step in the <a href="https://cmake.org/cmake/help/latest/manual/cmake-gui.1.html">CMake GUI</a> or <a href="https://cmake.org/cmake/help/latest/manual/ccmake.1.html">ccmake</a>.
|
||||||
|
|
||||||
For Visual Studio it could look like this:
|
Now you can build the library using:
|
||||||
|
\code{.sh}
|
||||||
|
$ cmake --build . --config "Debug"
|
||||||
|
\endcode
|
||||||
|
Here we explicitly build the configuration \c Debug ... you can also build other configurations here, as e.g. \c Release . The final build will put all of these side-by-side into the install directory, sou can can generate a multi-configuration installation. When linking to JKQTBuilder, the matching condfiguration´should be selected automatically!
|
||||||
|
|
||||||
|
\subsection page_buildinstructions_CMAKE_VSTUDIO Configuring&Building with Visual Studio/MSVC
|
||||||
|
|
||||||
|
For Visual Studio / Visual C++ the build looks similar, but you will have to select one of the <a href="https://cmake.org/cmake/help/latest/manual/cmake-generators.7.html#id14"><code>Visula Studio ...</code> generators</a>, e.g. :
|
||||||
|
|
||||||
\code{.sh}
|
\code{.sh}
|
||||||
$ mkdir build
|
$ mkdir build
|
||||||
$ cd build
|
$ cd build
|
||||||
$ cmake .. -G "Visual Studio 15 2017 Win64" "-DCMAKE_PREFIX_PATH=<path_to_your_qt_sources>"
|
$ cmake .. -G "Visual Studio 16 2019 Win64" "-DCMAKE_PREFIX_PATH=<path_to_your_qt_sources>"
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
Where \c \<path_to_your_qt_sources\> could be e.g. \c C:/development/Qt5/5.12.0/msvc2017_64 . This call results in a Visual Studio solution \c build/JKQTPlotter.sln that you can load and compile from the Visual Studio IDE. Alternatively you can also build the solution directly calling:
|
Where \c \<path_to_your_qt_sources\> could be e.g. \c C:/Qt/6.5.0/msvc2019_64 . This call results in a Visual Studio solution \c build/JKQTPlotter.sln that you can load and compile from the Visual Studio IDE. Alternatively you can also build the solution directly calling:
|
||||||
\code{.sh}
|
\code{.sh}
|
||||||
$ cmake --build . --config "Debug"
|
$ cmake --build . --config "Debug"
|
||||||
\endcode
|
\endcode
|
||||||
Afterwards you can install the library by
|
Again we explicitly build the configuration \c Debug ... you can also build other configurations here, as e.g. \c Release . The final build will put all of these side-by-side into the install directory, sou can can generate a multi-configuration installation. When linking to JKQTBuilder, the matching condfiguration´should be selected automatically!
|
||||||
\code{.sh}
|
|
||||||
$ cmake --build . --config "Debug" --target install
|
|
||||||
\endcode
|
|
||||||
|
|
||||||
\section page_buildinstructions_CMAKE_CONFIG Configuring a Build with CMake
|
\subsection page_buildinstructions_CMAKE_CONFIG Configuring a Build with CMake
|
||||||
|
|
||||||
The CMake build system offers several configuration variables that you may set/change to modify the outcome of the build:
|
The CMake build system offers several configuration variables that you may set/change to modify the outcome of the build (in the examples above, \c CMAKE_PREFIX_PATH is already used, you may set the following options in the same way:
|
||||||
|
- \c CMAKE_INSTALL_PREFIX : Install directory for the library
|
||||||
- \c CMAKE_PREFIX_PATH : add the path to your Qt installatrion to this variable, so the \c find_package(Qt5...) commands find the libraries you want to use
|
- \c CMAKE_PREFIX_PATH : add the path to your Qt installatrion to this variable, so the \c find_package(Qt5...) commands find the libraries you want to use
|
||||||
- \c JKQtPlotter_BUILD_SHARED_LIBS : Build as shared library (default: \c ON )
|
- \c BUILD_SHARED_LIBS : Build as shared library (default: \c ON ), if this is \c OFF the library will be built as a static library
|
||||||
- \c JKQtPlotter_BUILD_STATIC_LIBS : Build as static library (default: \c ON )
|
|
||||||
- \c JKQtPlotter_BUILD_INCLUDE_XITS_FONTS : Include XITS fonts as resources in library (default: \c ON )
|
- \c JKQtPlotter_BUILD_INCLUDE_XITS_FONTS : Include XITS fonts as resources in library (default: \c ON )
|
||||||
- \c JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS : Include Fira Math fonts as resources in library (default: \c ON )
|
- \c JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS : Include Fira Math fonts as resources in library (default: \c ON )
|
||||||
- \c JKQtPlotter_BUILD_FORCE_NO_PRINTER_SUPPORT : switches off print-support (when set to \c ON ), even if the current platform supports it (default: \c OFF )
|
- \c JKQtPlotter_BUILD_FORCE_NO_PRINTER_SUPPORT : switches off print-support (when set to \c ON ), even if the current platform supports it (default: \c OFF )
|
||||||
- \c JKQtPlotter_BUILD_DECORATE_LIBNAMES_WITH_BUILDTYPE : If set, the build-type is appended to the library name (default: \c ON )
|
- \c JKQtPlotter_BUILD_DECORATE_LIBNAMES_WITH_BUILDTYPE : If set, the build-type is appended to the library name (default: \c ON )
|
||||||
- \c JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS : If set, the build uses precompiled headers to speed up (a bit) (default: \c ON )
|
- \c JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS : If set, the build uses precompiled headers to speed up (a bit) (default: \c ON )
|
||||||
- \c JKQtPlotter_ENABLED_CXX20 : Build using C++20 (requires a compiler that supports this! (default: \c OFF )
|
- \c JKQtPlotter_ENABLED_CXX20 : Build using C++20 (requires a compiler that supports this! (default: \c OFF )
|
||||||
|
- \c JKQtPlotter_BUILD_WITH_TIMING_INFO_OUTPUT : If enabled (\c ON ), additional tiing code is activated (and built into the library), which outputs timming information for several functions of the library into \c qDebug() . This is intended for development putposes only, NOT for productive builds! (default: \c OFF )
|
||||||
- \c JKQtPlotter_BUILD_EXAMPLES : Build examples (default: \c ON )
|
- \c JKQtPlotter_BUILD_EXAMPLES : Build examples (default: \c ON )
|
||||||
- \c JKQtPlotter_BUILD_TOOLS : Build tools (default: \c ON )
|
- \c JKQtPlotter_BUILD_TOOLS : Build tools (default: \c ON )
|
||||||
- \c CMAKE_INSTALL_PREFIX : Install directory for the library
|
- \c JKQtPlotter_BUILD_LIB_JKQTMATH : Build sub-library JKQTMath (default: \c ON )
|
||||||
|
- \c JKQtPlotter_BUILD_LIB_JKQTMATHTEXT : Build sub-library JKQTMathText (default: \c ON )
|
||||||
|
- DEPRECATED: \c JKQtPlotter_BUILD_LIB_JKQTFASTPLOTTER : Build sub-library JKQTFastPlotter (default: \c ON ) ... Note: This option may change to default=OFF in future ... and may be removed thereafter!
|
||||||
|
- \c JKQtPlotter_BUILD_LIB_JKQTPLOTTER : Build sub-library JKQTPlotter (default: \c ON )
|
||||||
.
|
.
|
||||||
|
|
||||||
|
\subsection page_buildinstructions_CMAKE_INSTALL Installing with CMake
|
||||||
|
|
||||||
|
Finally, after a successful build, you can install the binaries, headers etc. into a directory, given by the CMake option \c CMAKE_INSTALL_PREFIX . Simply run:
|
||||||
|
\code{.sh}
|
||||||
|
$ cmake --build . --config "Debug" --target install
|
||||||
|
\endcode
|
||||||
|
or:
|
||||||
|
\code{.sh}
|
||||||
|
$ cmake --install . --config "Debug"
|
||||||
|
\endcode
|
||||||
|
in your build directory. Again we explicitly build the configuration \c Debug ... you can also build other configurations here, as e.g. \c Release . The final build will put all of these side-by-side into the install directory, sou can can generate a multi-configuration installation. When linking to JKQTBuilder, the matching condfiguration´should be selected automatically!
|
||||||
|
|
||||||
|
You will end up with an install directory that constains subdirectories, such as \c lib/ , \c include/ or \c bin/ . Thesecontain the build results. The next section \ref page_buildinstructions_CMAKE_USAGE describes how to use such an installation to link against JKQTPlotter.
|
||||||
|
|
||||||
|
|
||||||
|
\section page_buildinstructions_CMAKE_USAGE Using a CMake Build
|
||||||
\section page_buildinstructions_CMAKE_USAGE Using a built, generated with CMake
|
|
||||||
|
|
||||||
After building and installing JKQTPlotter you have all files that you need inside the instal directory:
|
After building and installing JKQTPlotter you have all files that you need inside the instal directory:
|
||||||
- \c \<INSTALLDIR\>/include contains all required header files
|
- \c \<CMAKE_INSTALL_PREFIX\>/include contains all required header files
|
||||||
- \c \<INSTALLDIR\>/bin contains the shared libraries
|
- \c \<CMAKE_INSTALL_PREFIX\>/bin contains the shared libraries, examples, tools
|
||||||
- \c \<INSTALLDIR\>/lib contains the link libraries
|
- \c \<CMAKE_INSTALL_PREFIX\>/lib contains the link libraries
|
||||||
- \c \<INSTALLDIR\>/lib/cmake contains files necessary for CMake's \c find_package() to work
|
- \c \<CMAKE_INSTALL_PREFIX\>/lib/cmake/JKQTPlotterX/ contains files necessary for CMake's \c find_package() to work
|
||||||
.
|
.
|
||||||
|
|
||||||
You can find an example project that uses a complete cmake-build here: \ref JKQTCMakeLinkExample (online: <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/examples/cmake_link_example">https://github.com/jkriege2/JKQtPlotter/blob/master/examples/cmake_link_example</a>).
|
The build/install above generates several CMake targets that can be used to link against JKQTPlotter (or one of its sub libraries). The generated targets are (note that the Qt-version number appears the target names!!!):
|
||||||
|
- \c JKQTPlotter6::JKQTPlotter6 / \c JKQTPlotter5::JKQTPlotter5 : the main plotting library, containing JKQTPlottter and JKQTBasePlotter
|
||||||
|
- \c JKQTPlotter6::JKQTMathText6 / \c JKQTPlotter5::JKQTMathText5 : the LaTeX rendering library containing JKQTMathText
|
||||||
|
- \c JKQTPlotter6::JKQTCommmon6 / \c JKQTPlotter5::JKQTCommon5 : basic tools and facilities for the other libraries
|
||||||
|
- \c JKQTPlotter6::JKQTMath6 / \c JKQTPlotter5::JKQTMath5 : additional mathematical algorithms to be used with JKQTPlotter (e.g. a statistics library with histograming, KDE or regression)
|
||||||
|
- \DEPRECATED: c JKQTPlotter6::JKQTFastPlotter6 / \c JKQTPlotter5::JKQTFastPlotter5 : an alternative plotting library with less features, but which is supposed to be fast,conatins JKQTFastPlotter
|
||||||
|
|
||||||
|
You can find an example project that uses a complete cmake-build here: \ref JKQTCMakeLinkExample (online: <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/examples/cmake_link_example"><code>examples/cmake_link_example</code></a>).
|
||||||
|
|
||||||
Here is the \c CMakeLists.txt from that directory:
|
Here is the \c CMakeLists.txt from that directory:
|
||||||
|
|
||||||
\code{.cmake}
|
\code{.cmake}
|
||||||
# set minimum required CMake-Version
|
# set minimum required CMake-Version
|
||||||
cmake_minimum_required(VERSION 3.10)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
# set Project name
|
# set Project name
|
||||||
set(EXAMPLE_NAME simpletest)
|
project(simpletest_cmake LANGUAGES CXX)
|
||||||
set(EXENAME jkqtptest_${EXAMPLE_NAME})
|
|
||||||
project(${EXAMPLE_NAME} LANGUAGES CXX)
|
|
||||||
|
|
||||||
# some basic configurations
|
# some basic configurations
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
|
||||||
#set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
|
||||||
|
|
||||||
# Configure project for usage of Qt5
|
# Configure project for usage of Qt5/Qt6
|
||||||
find_package(Qt5 COMPONENTS Core Gui Widgets PrintSupport Svg Xml OpenGl REQUIRED)
|
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui Widgets PrintSupport Svg Xml OpenGl REQUIRED)
|
||||||
# Configure project for usage of Qt6
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Widgets PrintSupport Svg Xml OpenGL REQUIRED)
|
||||||
#find_package(Qt6 COMPONENTS Core Gui Widgets PrintSupport Svg Xml OpenGl OpenGLWidgets REQUIRED)
|
|
||||||
|
|
||||||
# include JKQTPlotter
|
|
||||||
find_package(JKQTCommonLib REQUIRED)
|
|
||||||
find_package(JKQTMathTextLib REQUIRED)
|
|
||||||
find_package(JKQTPlotterLib REQUIRED)
|
|
||||||
|
|
||||||
# For Visual Studio, we need to set some additional compiler options
|
# include JKQTPlotter
|
||||||
if(MSVC)
|
find_package(JKQTPlotter${QT_VERSION_MAJOR} REQUIRED)
|
||||||
add_compile_options(/EHsc)
|
|
||||||
# To enable M_PI, M_E,...
|
|
||||||
add_definitions(/D_USE_MATH_DEFINES)
|
|
||||||
# To Prevent Errors with min() and max()
|
|
||||||
add_definitions(/DNOMINMAX)
|
|
||||||
# To fix error: C2338: va_start argument must not
|
|
||||||
# have reference type and must not be parenthesized
|
|
||||||
add_definitions(/D_CRT_NO_VA_START_VALIDATION)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# add the example executable
|
# For Visual Studio, we need to set some additional compiler options
|
||||||
add_executable(${EXENAME} WIN32 simpletest.cpp)
|
if(MSVC)
|
||||||
# ... link against Qt5 and JKQTPlotterLib
|
add_compile_options(/EHsc)
|
||||||
# (you could use JKQTPlotterSharedLib if you don't want to link againast the
|
# To enable M_PI, M_E,...
|
||||||
# static version, but against the shared/DLL version).
|
add_definitions(/D_USE_MATH_DEFINES)
|
||||||
target_link_libraries(${EXENAME} Qt5::Core Qt5::Widgets Qt5::Gui Qt5::PrintSupport Qt5::Svg Qt5::Xml JKQTPlotterLib)
|
# To Prevent Errors with min() and max()
|
||||||
|
add_definitions(/DNOMINMAX)
|
||||||
|
# To fix error: C2338: va_start argument must not
|
||||||
|
# have reference type and must not be parenthesized
|
||||||
|
add_definitions(/D_CRT_NO_VA_START_VALIDATION)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Installation
|
# add the example executable
|
||||||
install(TARGETS ${EXENAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
add_executable(${PROJECT_NAME} WIN32 simpletest.cpp)
|
||||||
|
# ... link against Qt5/6 and JKQTPlotterLib
|
||||||
|
# (you could use JKQTPlotterSharedLib if you don't want to link againast the
|
||||||
|
# static version, but against the shared/DLL version).
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::Xml)
|
||||||
|
# ... link against JKQTPlotter: As the Targets contain the Qt-Version-Number in their names, we can
|
||||||
|
# link against 'JKQTPlotter${QT_VERSION_MAJOR}::JKQTPlotter${QT_VERSION_MAJOR}' and it works
|
||||||
|
# for Qt5 AND Qt6 ...
|
||||||
|
# if you have a speific Qt-Version, you can also write e.g. 'JKQTPlotter6::JKQTPlotter6'
|
||||||
|
target_link_libraries(${PROJECT_NAME} JKQTPlotter${QT_VERSION_MAJOR}::JKQTPlotter${QT_VERSION_MAJOR})
|
||||||
|
|
||||||
|
|
||||||
|
# Installation
|
||||||
|
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
|
\endcode
|
||||||
|
|
||||||
|
As you can see this cooks down to first finding the library, using
|
||||||
|
\code{.cmake}
|
||||||
|
find_package(JKQTPlotter${QT_VERSION_MAJOR} REQUIRED)
|
||||||
|
\endcode
|
||||||
|
and then linking against the appropriate target from the list above:
|
||||||
|
\code{.cmake}
|
||||||
|
target_link_libraries(${PROJECT_NAME} JKQTPlotter${QT_VERSION_MAJOR}::JKQTPlotter${QT_VERSION_MAJOR})
|
||||||
|
\endcode
|
||||||
|
If you don't need to be Qt-version agnostic, you can simply write:
|
||||||
|
\code{.cmake}
|
||||||
|
find_package(JKQTPlotter6 REQUIRED)
|
||||||
|
target_link_libraries(${PROJECT_NAME} JKQTPlotter6::JKQTPlotter6)
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
|
|
||||||
|
To build this example, you first need to make a subdirectory `build` inside the example directory <code>examples/cmake_link_example</code> and then call CMake form that subdirectory:
|
||||||
To build this example, you first need to make a subdirectory `build` and then call CMake form that subdirectory:
|
|
||||||
\code{.sh}
|
\code{.sh}
|
||||||
$ mkdir build
|
$ mkdir build
|
||||||
$ cd build
|
$ cd build
|
||||||
$ cmake .. -G "<GENERATOR>" "-DCMAKE_PREFIX_PATH=<path_to_your_qt_sources> -DCMAKE_MODULE_PATH=<path_to_lib/cmake_dir_of_JKQTPLOTTER>"
|
$ cmake .. -G "<GENERATOR>" "-DCMAKE_PREFIX_PATH=<path_to_your_qt_sources>;<JKQTPLOTTER_INSTALL_DIR>"
|
||||||
\endcode
|
\endcode
|
||||||
The you can use the generated makefiles (e.g. load them in an editor, or build them jsing \c make ). In the last line above, you need to specify two directories:
|
Again choose any CMake \c <GENERATOR> that is appropriate for your use-case. Replace \c <path_to_your_qt_sources> by the path of your Qt installation and \c <JKQTPLOTTER_INSTALL_DIR> by the \c CMAKE_INSTALL_PREFIX of your JKQTPlotter Build (see above).
|
||||||
- \c \<path_to_your_qt_sources\> points to you Qt installation
|
|
||||||
- \c \<path_to_lib/cmake_dir_of_JKQTPLOTTER\> points to the directory containing the \c XYZ.cmake -files from the JKQTPlotter build. Typically this is \c \<JKQTPLOTTER_INSTALL_DIR\>/lib/cmake , where \c \<JKQTPLOTTER_INSTALL_DIR\> is the directory into which you installed JKQTPlotter.
|
|
||||||
.
|
|
||||||
|
|
||||||
|
Then you can again build the example either using the generated builf files (e.g. a Visual Studio solution), or by running
|
||||||
|
\code{.sh}
|
||||||
|
$ cmake --build . --config "Debug" --target install
|
||||||
|
\endcode
|
||||||
|
|
||||||
*/
|
*/
|
@ -1,14 +1,14 @@
|
|||||||
/*!
|
/*!
|
||||||
|
|
||||||
|
|
||||||
\page page_buildinstructions_QMAKE Build using QMake
|
\page page_buildinstructions_QMAKE DEPRECATED: Build using QMake
|
||||||
|
|
||||||
\warning The <a href="https://doc.qt.io/qt-6/qmake-manual.html">QMake</a> build system is deprecated and will
|
\warning The <a href="https://doc.qt.io/qt-6/qmake-manual.html">QMake</a> build system is deprecated and will
|
||||||
not get the same love and atttention as the recommended CMake system, see \ref page_buildinstructions_CMAKE !
|
not get the same love and atttention as the recommended CMake system, see \ref page_buildinstructions_CMAKE !
|
||||||
|
|
||||||
\tableofcontents
|
\tableofcontents
|
||||||
|
|
||||||
\section page_buildinstructions_QMAKEINCLUDE QMake Include Project
|
\section page_buildinstructions_QMAKEINCLUDE DEPRECATED: QMake Include Project
|
||||||
|
|
||||||
If you want to simply include the JKQTPlotter Source code into your projects, without build a shared or static library and linking against it, you can use one of these QMake-Include files:
|
If you want to simply include the JKQTPlotter Source code into your projects, without build a shared or static library and linking against it, you can use one of these QMake-Include files:
|
||||||
- <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/lib/jkqtplotter.pri">lib/jkqtplotter.pri</a> includes the complete library (JKQTPlotter, JKQTFastPlotter, JKQTMathText)
|
- <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/lib/jkqtplotter.pri">lib/jkqtplotter.pri</a> includes the complete library (JKQTPlotter, JKQTFastPlotter, JKQTMathText)
|
||||||
@ -21,7 +21,7 @@ In your <a href="https://doc.qt.io/qt-6/qmake-manual.html">QMake</a>-projects it
|
|||||||
include(<PATHTOJKQTPLOTTERDIR>/lib/jkqtplotter.pri)
|
include(<PATHTOJKQTPLOTTERDIR>/lib/jkqtplotter.pri)
|
||||||
\endcode
|
\endcode
|
||||||
|
|
||||||
\section page_buildinstructions_QMAKESTATIC QMake Static Library
|
\section page_buildinstructions_QMAKESTATIC DEPRECATED: QMake Static Library
|
||||||
|
|
||||||
There are several `.PRO`-files, that can be used to build the full library, or a limited subsets of it as static link library:
|
There are several `.PRO`-files, that can be used to build the full library, or a limited subsets of it as static link library:
|
||||||
- <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/qmake/staticlib/jkqtplotterlib/jkqtplotterlib.pro">qmake/staticlib/jkqtplotterlib/jkqtplotterlib.pro</a> builds the complete library (JKQTPlotter, JKQTFastPlotter, JKQTMathText) as static link library
|
- <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/qmake/staticlib/jkqtplotterlib/jkqtplotterlib.pro">qmake/staticlib/jkqtplotterlib/jkqtplotterlib.pro</a> builds the complete library (JKQTPlotter, JKQTFastPlotter, JKQTMathText) as static link library
|
||||||
@ -64,7 +64,7 @@ SUBDIRS += jkqtplotterlib_static test_styling
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
\section page_buildinstructions_QMAKEDYNAMIC QMake Dynamic Library
|
\section page_buildinstructions_QMAKEDYNAMIC DEPRECATED: QMake Dynamic Library
|
||||||
|
|
||||||
There are several `.PRO`-files, that can be used to build the full library, or a limited subsets of it as shred library:
|
There are several `.PRO`-files, that can be used to build the full library, or a limited subsets of it as shred library:
|
||||||
- <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/qmake/sharedlib/jkqtplotterlib/jkqtplotterlib.pro">qmake/sharedlib/jkqtplotterlib/jkqtplotterlib.pro</a> builds the complete library (JKQTPlotter, JKQTFastPlotter, JKQTMathText) as shared library
|
- <a href="https://github.com/jkriege2/JKQtPlotter/blob/master/qmake/sharedlib/jkqtplotterlib/jkqtplotterlib.pro">qmake/sharedlib/jkqtplotterlib/jkqtplotterlib.pro</a> builds the complete library (JKQTPlotter, JKQTFastPlotter, JKQTMathText) as shared library
|
||||||
@ -118,7 +118,7 @@ SUBDIRS += jkqtplotterlib_shared test_styling
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
\section page_buildinstructions_QMAKEQTCREATOR QMake in QTCreator
|
\section page_buildinstructions_QMAKEQTCREATOR DEPRECATED: QMake in QTCreator
|
||||||
|
|
||||||
You can load the file \c JKQtPlotterBuildAllExamples.pro in te base directory of the project directly in QtCreator and use it to build the library and the examples.
|
You can load the file \c JKQtPlotterBuildAllExamples.pro in te base directory of the project directly in QtCreator and use it to build the library and the examples.
|
||||||
|
|
||||||
|
@ -6,9 +6,6 @@ This page lists several todos and wishes for future version of JKQTPlotter
|
|||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li>General:<ul>
|
<li>General:<ul>
|
||||||
<li>build system: provide general targets JKQTPlotter::JKQTPlotter, JKQTPlotter::JKQTMathText, instead of targets which differ by linking option</li>
|
|
||||||
<li>build system: refactor CMake-Code, so static/dynamic switch is done on compile and only one variant is built</li>
|
|
||||||
<li>build system: maybe prepare for CMake's <a href="https://cmake.org/cmake/help/latest/module/FetchContent.html">FetchContent</a>-API (+ possibly providing a reduced source-package for each release)</li>
|
|
||||||
<li>Lib Utilities: General and portable way to mark functions and classes as deprecated for different compilers</li>
|
<li>Lib Utilities: General and portable way to mark functions and classes as deprecated for different compilers</li>
|
||||||
</ul></li>
|
</ul></li>
|
||||||
<li>JKQTPlotter:<ul>
|
<li>JKQTPlotter:<ul>
|
||||||
|
@ -29,79 +29,83 @@ message( STATUS "...............................................................
|
|||||||
message( STATUS ".. BUILDING EXAMPLE TOOLS LIB:" )
|
message( STATUS ".. BUILDING EXAMPLE TOOLS LIB:" )
|
||||||
add_subdirectory(libexampletools)
|
add_subdirectory(libexampletools)
|
||||||
|
|
||||||
|
if (JKQtPlotter_BUILD_LIB_JKQTFASTPLOTTER)
|
||||||
|
# examples for JKQtFastPlotter
|
||||||
|
message( STATUS ".. BUILDING EXAMPLES FOR JKQTFASTPLOTTER:" )
|
||||||
|
add_subdirectory(jkqtfastplotter_test)
|
||||||
|
endif()
|
||||||
|
|
||||||
# examples for JKQtFastPlotter
|
if (JKQtPlotter_BUILD_LIB_JKQTMATHTEXT)
|
||||||
message( STATUS ".. BUILDING EXAMPLES FOR JKQTFASTPLOTTER:" )
|
# examples specific to JKQtMathText
|
||||||
add_subdirectory(jkqtfastplotter_test)
|
message( STATUS ".. BUILDING EXAMPLES FOR JKQTMATHTEXT:" )
|
||||||
|
add_subdirectory(jkqtmathtext_simpletest)
|
||||||
|
add_subdirectory(jkqtmathtext_test)
|
||||||
|
endif()
|
||||||
|
|
||||||
# examples specific to JKQtMathText
|
if (JKQtPlotter_BUILD_LIB_JKQTPLOTTER)
|
||||||
message( STATUS ".. BUILDING EXAMPLES FOR JKQTMATHTEXT:" )
|
# examples for JKQtPlotter
|
||||||
add_subdirectory(jkqtmathtext_simpletest)
|
message( STATUS ".. BUILDING EXAMPLES FOR JKQTPLOTTER:" )
|
||||||
add_subdirectory(jkqtmathtext_test)
|
# needs to be first for Precompiled Headers to work
|
||||||
|
add_subdirectory(simpletest)
|
||||||
# examples for JKQtPlotter
|
|
||||||
message( STATUS ".. BUILDING EXAMPLES FOR JKQTPLOTTER:" )
|
|
||||||
# needs to be first for Precompiled Headers to work
|
|
||||||
add_subdirectory(simpletest)
|
|
||||||
|
|
||||||
add_subdirectory(jkqtplot_test)
|
|
||||||
add_subdirectory(advplotstyling)
|
|
||||||
add_subdirectory(barchart)
|
|
||||||
add_subdirectory(boxplot)
|
|
||||||
add_subdirectory(barchart_errorbars)
|
|
||||||
add_subdirectory(barchart_functorfill)
|
|
||||||
add_subdirectory(barchart_twocolor)
|
|
||||||
add_subdirectory(barchart_customdrawfunctor)
|
|
||||||
add_subdirectory(contourplot)
|
|
||||||
add_subdirectory(datastore)
|
|
||||||
add_subdirectory(datastore_groupedstat)
|
|
||||||
add_subdirectory(datastore_iterators)
|
|
||||||
add_subdirectory(datastore_regression)
|
|
||||||
add_subdirectory(datastore_statistics)
|
|
||||||
add_subdirectory(datastore_statistics_2d)
|
|
||||||
add_subdirectory(dateaxes)
|
|
||||||
add_subdirectory(distributionplot)
|
|
||||||
add_subdirectory(errorbarstyles)
|
|
||||||
add_subdirectory(evalcurve)
|
|
||||||
add_subdirectory(filledgraphs)
|
|
||||||
add_subdirectory(filledgraphs_errors)
|
|
||||||
add_subdirectory(functionplot)
|
|
||||||
add_subdirectory(geo_arrows)
|
|
||||||
add_subdirectory(geo_simple)
|
|
||||||
add_subdirectory(geo_coordinateaxis0)
|
|
||||||
add_subdirectory(geometric)
|
|
||||||
add_subdirectory(imageplot)
|
|
||||||
add_subdirectory(imageplot_cimg)
|
|
||||||
add_subdirectory(imageplot_modifier)
|
|
||||||
add_subdirectory(imageplot_nodatastore)
|
|
||||||
add_subdirectory(imageplot_opencv)
|
|
||||||
add_subdirectory(imageplot_userpal)
|
|
||||||
add_subdirectory(impulsesplot)
|
|
||||||
add_subdirectory(logaxes)
|
|
||||||
add_subdirectory(mandelbrot)
|
|
||||||
add_subdirectory(multiplot)
|
|
||||||
add_subdirectory(multithreaded)
|
|
||||||
add_subdirectory(parametriccurve)
|
|
||||||
add_subdirectory(paramscatterplot)
|
|
||||||
add_subdirectory(paramscatterplot_image)
|
|
||||||
add_subdirectory(paramscatterplot_customsymbol)
|
|
||||||
add_subdirectory(parsedfunctionplot)
|
|
||||||
add_subdirectory(rgbimageplot)
|
|
||||||
add_subdirectory(rgbimageplot_cimg)
|
|
||||||
add_subdirectory(rgbimageplot_opencv)
|
|
||||||
add_subdirectory(rgbimageplot_qt)
|
|
||||||
add_subdirectory(scatter)
|
|
||||||
add_subdirectory(scatter_customsymbol)
|
|
||||||
add_subdirectory(second_axis)
|
|
||||||
add_subdirectory(speed)
|
|
||||||
add_subdirectory(stackedbars)
|
|
||||||
add_subdirectory(stepplots)
|
|
||||||
add_subdirectory(styledboxplot)
|
|
||||||
add_subdirectory(styling)
|
|
||||||
add_subdirectory(symbols_and_errors)
|
|
||||||
add_subdirectory(symbols_and_styles)
|
|
||||||
add_subdirectory(ui)
|
|
||||||
add_subdirectory(user_interaction)
|
|
||||||
add_subdirectory(violinplot)
|
|
||||||
add_subdirectory(wiggleplots)
|
|
||||||
|
|
||||||
|
add_subdirectory(jkqtplot_test)
|
||||||
|
add_subdirectory(advplotstyling)
|
||||||
|
add_subdirectory(barchart)
|
||||||
|
add_subdirectory(boxplot)
|
||||||
|
add_subdirectory(barchart_errorbars)
|
||||||
|
add_subdirectory(barchart_functorfill)
|
||||||
|
add_subdirectory(barchart_twocolor)
|
||||||
|
add_subdirectory(barchart_customdrawfunctor)
|
||||||
|
add_subdirectory(contourplot)
|
||||||
|
add_subdirectory(datastore)
|
||||||
|
add_subdirectory(datastore_groupedstat)
|
||||||
|
add_subdirectory(datastore_iterators)
|
||||||
|
add_subdirectory(datastore_regression)
|
||||||
|
add_subdirectory(datastore_statistics)
|
||||||
|
add_subdirectory(datastore_statistics_2d)
|
||||||
|
add_subdirectory(dateaxes)
|
||||||
|
add_subdirectory(distributionplot)
|
||||||
|
add_subdirectory(errorbarstyles)
|
||||||
|
add_subdirectory(evalcurve)
|
||||||
|
add_subdirectory(filledgraphs)
|
||||||
|
add_subdirectory(filledgraphs_errors)
|
||||||
|
add_subdirectory(functionplot)
|
||||||
|
add_subdirectory(geo_arrows)
|
||||||
|
add_subdirectory(geo_simple)
|
||||||
|
add_subdirectory(geo_coordinateaxis0)
|
||||||
|
add_subdirectory(geometric)
|
||||||
|
add_subdirectory(imageplot)
|
||||||
|
add_subdirectory(imageplot_cimg)
|
||||||
|
add_subdirectory(imageplot_modifier)
|
||||||
|
add_subdirectory(imageplot_nodatastore)
|
||||||
|
add_subdirectory(imageplot_opencv)
|
||||||
|
add_subdirectory(imageplot_userpal)
|
||||||
|
add_subdirectory(impulsesplot)
|
||||||
|
add_subdirectory(logaxes)
|
||||||
|
add_subdirectory(mandelbrot)
|
||||||
|
add_subdirectory(multiplot)
|
||||||
|
add_subdirectory(multithreaded)
|
||||||
|
add_subdirectory(parametriccurve)
|
||||||
|
add_subdirectory(paramscatterplot)
|
||||||
|
add_subdirectory(paramscatterplot_image)
|
||||||
|
add_subdirectory(paramscatterplot_customsymbol)
|
||||||
|
add_subdirectory(parsedfunctionplot)
|
||||||
|
add_subdirectory(rgbimageplot)
|
||||||
|
add_subdirectory(rgbimageplot_cimg)
|
||||||
|
add_subdirectory(rgbimageplot_opencv)
|
||||||
|
add_subdirectory(rgbimageplot_qt)
|
||||||
|
add_subdirectory(scatter)
|
||||||
|
add_subdirectory(scatter_customsymbol)
|
||||||
|
add_subdirectory(second_axis)
|
||||||
|
add_subdirectory(speed)
|
||||||
|
add_subdirectory(stackedbars)
|
||||||
|
add_subdirectory(stepplots)
|
||||||
|
add_subdirectory(styledboxplot)
|
||||||
|
add_subdirectory(styling)
|
||||||
|
add_subdirectory(symbols_and_errors)
|
||||||
|
add_subdirectory(symbols_and_styles)
|
||||||
|
add_subdirectory(ui)
|
||||||
|
add_subdirectory(user_interaction)
|
||||||
|
add_subdirectory(violinplot)
|
||||||
|
add_subdirectory(wiggleplots)
|
||||||
|
endif()
|
||||||
|
@ -15,11 +15,7 @@ set(UIS advplotstyling.qrc )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,11 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,11 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,11 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,11 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,11 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -1,16 +1,12 @@
|
|||||||
# set minimum required CMake-Version
|
# set minimum required CMake-Version
|
||||||
cmake_minimum_required(VERSION 3.20)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
# set Project name
|
# set Project name
|
||||||
set(EXAMPLE_NAME simpletest)
|
project(simpletest_cmake LANGUAGES CXX)
|
||||||
set(EXENAME jkqtptest_${EXAMPLE_NAME})
|
|
||||||
project(${EXAMPLE_NAME} LANGUAGES CXX)
|
|
||||||
|
|
||||||
# some basic configurations
|
# some basic configurations
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
set(CMAKE_CXX_STANDARD 11)
|
|
||||||
#set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
|
||||||
|
|
||||||
# Configure project for usage of Qt5/Qt6
|
# Configure project for usage of Qt5/Qt6
|
||||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui Widgets PrintSupport Svg Xml OpenGl REQUIRED)
|
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui Widgets PrintSupport Svg Xml OpenGl REQUIRED)
|
||||||
@ -18,7 +14,7 @@ find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Widgets PrintSupport Svg
|
|||||||
|
|
||||||
|
|
||||||
# include JKQTPlotter
|
# include JKQTPlotter
|
||||||
find_package(JKQTPlotterLib REQUIRED)
|
find_package(JKQTPlotter${QT_VERSION_MAJOR} REQUIRED)
|
||||||
|
|
||||||
# For Visual Studio, we need to set some additional compiler options
|
# For Visual Studio, we need to set some additional compiler options
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
@ -33,15 +29,19 @@ if(MSVC)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# add the example executable
|
# add the example executable
|
||||||
add_executable(${EXENAME} WIN32 simpletest.cpp)
|
add_executable(${PROJECT_NAME} WIN32 simpletest.cpp)
|
||||||
# ... link against Qt5/6 and JKQTPlotterLib
|
# ... link against Qt5/6 and JKQTPlotterLib
|
||||||
# (you could use JKQTPlotterSharedLib if you don't want to link againast the
|
# (you could use JKQTPlotterSharedLib if you don't want to link againast the
|
||||||
# static version, but against the shared/DLL version).
|
# static version, but against the shared/DLL version).
|
||||||
target_link_libraries(${EXENAME} Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::Xml JKQTPlotterLib)
|
target_link_libraries(${PROJECT_NAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::Xml)
|
||||||
|
# ... link against JKQTPlotter: As the Targets contain the Qt-Version-Number in their names, we can
|
||||||
|
# link against 'JKQTPlotter${QT_VERSION_MAJOR}::JKQTPlotter${QT_VERSION_MAJOR}' and it works
|
||||||
|
# for Qt5 AND Qt6 ...
|
||||||
|
# if you have a speific Qt-Version, you can also write e.g. 'JKQTPlotter6::JKQTPlotter6'
|
||||||
|
target_link_libraries(${PROJECT_NAME} PUBLIC JKQTPlotter${QT_VERSION_MAJOR}::JKQTPlotter${QT_VERSION_MAJOR})
|
||||||
|
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
install(TARGETS ${EXENAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
install(TARGETS ${PROJECT_NAME}
|
||||||
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
|
||||||
#Installation of Qt DLLs on Windows
|
)
|
||||||
include(${CMAKE_CURRENT_LIST_DIR}/../../cmake/jkqtplotter_deployqt.cmake)
|
|
||||||
jkqtplotter_deployqt(${EXENAME})
|
|
||||||
|
@ -4,64 +4,80 @@ This project (see [`cmake_link_example`](https://github.com/jkriege2/JKQtPlotter
|
|||||||
|
|
||||||
This example uses very simple code, which simply displays a plotter and shows some data. The important part of this example is the ´CMakeLists.txt`-file:
|
This example uses very simple code, which simply displays a plotter and shows some data. The important part of this example is the ´CMakeLists.txt`-file:
|
||||||
```
|
```
|
||||||
# set minimum required CMake-Version
|
# set minimum required CMake-Version
|
||||||
cmake_minimum_required(VERSION 3.20)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
# set Project name
|
# set Project name
|
||||||
set(EXAMPLE_NAME simpletest)
|
project(simpletest_cmake LANGUAGES CXX)
|
||||||
set(EXENAME jkqtptest_${EXAMPLE_NAME})
|
|
||||||
project(${EXAMPLE_NAME} LANGUAGES CXX)
|
|
||||||
|
|
||||||
# some basic configurations
|
# some basic configurations
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
set(CMAKE_CXX_STANDARD 11) # for Qt5
|
|
||||||
#set(CMAKE_CXX_STANDARD 17) # for QT6
|
|
||||||
#set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
|
||||||
|
|
||||||
# Configure project for usage of Qt5/Qt6
|
# Configure project for usage of Qt5/Qt6
|
||||||
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui Widgets PrintSupport Svg Xml OpenGl REQUIRED)
|
find_package(QT NAMES Qt6 Qt5 COMPONENTS Core Gui Widgets PrintSupport Svg Xml OpenGl REQUIRED)
|
||||||
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Widgets PrintSupport Svg Xml OpenGL REQUIRED)
|
find_package(Qt${QT_VERSION_MAJOR} COMPONENTS Core Gui Widgets PrintSupport Svg Xml OpenGL REQUIRED)
|
||||||
|
|
||||||
# include JKQTPlotter
|
|
||||||
find_package(JKQTCommonLib REQUIRED)
|
|
||||||
find_package(JKQTMathTextLib REQUIRED)
|
|
||||||
find_package(JKQTPlotterLib REQUIRED)
|
|
||||||
|
|
||||||
# For Visual Studio, we need to set some additional compiler options
|
# include JKQTPlotter
|
||||||
if(MSVC)
|
find_package(JKQTPlotter${QT_VERSION_MAJOR} REQUIRED)
|
||||||
add_compile_options(/EHsc)
|
|
||||||
# To enable M_PI, M_E,...
|
|
||||||
add_definitions(/D_USE_MATH_DEFINES)
|
|
||||||
# To Prevent Errors with min() and max()
|
|
||||||
add_definitions(/DNOMINMAX)
|
|
||||||
# To fix error: C2338: va_start argument must not
|
|
||||||
# have reference type and must not be parenthesized
|
|
||||||
add_definitions(/D_CRT_NO_VA_START_VALIDATION)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# add the example executable
|
# For Visual Studio, we need to set some additional compiler options
|
||||||
add_executable(${EXENAME} WIN32 simpletest.cpp)
|
if(MSVC)
|
||||||
# ... link against Qt5 and JKQTPlotterLib
|
add_compile_options(/EHsc)
|
||||||
# (you could use JKQTPlotterSharedLib if you don't want to link againast the
|
# To enable M_PI, M_E,...
|
||||||
# static version, but against the shared/DLL version).
|
add_definitions(/D_USE_MATH_DEFINES)
|
||||||
target_link_libraries(${EXENAME} Qt5::Core Qt5::Widgets Qt5::Gui Qt5::PrintSupport Qt5::Svg Qt5::Xml JKQTPlotterLib)
|
# To Prevent Errors with min() and max()
|
||||||
|
add_definitions(/DNOMINMAX)
|
||||||
|
# To fix error: C2338: va_start argument must not
|
||||||
|
# have reference type and must not be parenthesized
|
||||||
|
add_definitions(/D_CRT_NO_VA_START_VALIDATION)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Installation
|
# add the example executable
|
||||||
install(TARGETS ${EXENAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
add_executable(${PROJECT_NAME} WIN32 simpletest.cpp)
|
||||||
|
# ... link against Qt5/6 and JKQTPlotterLib
|
||||||
|
# (you could use JKQTPlotterSharedLib if you don't want to link againast the
|
||||||
|
# static version, but against the shared/DLL version).
|
||||||
|
target_link_libraries(${PROJECT_NAME} Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::PrintSupport Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::Xml)
|
||||||
|
# ... link against JKQTPlotter: As the Targets contain the Qt-Version-Number in their names, we can
|
||||||
|
# link against 'JKQTPlotter${QT_VERSION_MAJOR}::JKQTPlotter${QT_VERSION_MAJOR}' and it works
|
||||||
|
# for Qt5 AND Qt6 ...
|
||||||
|
# if you have a speific Qt-Version, you can also write e.g. 'JKQTPlotter6::JKQTPlotter6'
|
||||||
|
target_link_libraries(${PROJECT_NAME} JKQTPlotter${QT_VERSION_MAJOR}::JKQTPlotter${QT_VERSION_MAJOR})
|
||||||
|
|
||||||
#Installation of Qt DLLs on Windows
|
|
||||||
include(${CMAKE_CURRENT_SOURCE_DIR}/../../cmake/jkqtplotter_deployqt.cmake)
|
# Installation
|
||||||
jkqtplotter_deployqt(${EXENAME})
|
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR})
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The important steps here are
|
||||||
|
```
|
||||||
|
# find JKQTPlotter
|
||||||
|
find_package(JKQTPlotter${QT_VERSION_MAJOR} REQUIRED)
|
||||||
|
|
||||||
|
# ...
|
||||||
|
|
||||||
|
# link against JKQtPlotter:
|
||||||
|
target_link_libraries(${EXENAME} JKQTPlotter${QT_VERSION_MAJOR}::JKQTPlotter${QT_VERSION_MAJOR})
|
||||||
|
```
|
||||||
|
|
||||||
|
We are using `${QT_VERSION_MAJOR}` here, as this file is supposed to work with both Qt5 AND Qt6. If you only use say Qt6, you can also write:
|
||||||
|
```
|
||||||
|
find_package(JKQTPlotter6 REQUIRED)
|
||||||
|
target_link_libraries(${EXENAME} JKQTPlotter6::JKQTPlotter6)
|
||||||
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
To build this example, you first need to make a subdirectory `build` and then call CMake form that subdirectory:
|
To build this example, you first need to make a subdirectory `build` and then call CMake form that subdirectory:
|
||||||
```.sh
|
```.sh
|
||||||
$ mkdir build
|
$ mkdir build
|
||||||
$ cd build
|
$ cd build
|
||||||
$ cmake .. -G "<GENERATOR>" "-DCMAKE_PREFIX_PATH=<path_to_your_qt_sources> -DCMAKE_MODULE_PATH=<path_to_lib/cmake_dir_of_JKQTPLOTTER>"
|
$ cmake .. -G "<GENERATOR>" "-DCMAKE_PREFIX_PATH=<path_to_your_qt_sources>;<path_to_JKQTPlotter_installdir>"
|
||||||
```
|
```
|
||||||
The you can use the generated makefiles (e.g. load them in an editor, or build them jsing `make`). In the last line above, you need to specify two directories:
|
The you can use the generated makefiles (e.g. load them in an editor, or build them jsing `make`). In the last line above, you need to specify two directories:
|
||||||
- `<path_to_your_qt_sources>` points to you Qt installation
|
- `<path_to_your_qt_sources>` points to you Qt installation
|
||||||
- `<path_to_lib/cmake_dir_of_JKQTPLOTTER>` points to the directory containing the `XYZ.cmake`-files from the JKQTPlotter build. Typically this is `<JKQTPLOTTER_INSTALL_DIR>/lib/cmake`, where `<JKQTPLOTTER_INSTALL_DIR>` is the directory into which you installed JKQTPlotter.
|
- `<path_to_JKQTPlotter_installdir>` points to the directory containing the JKQTPlotter build. Typically this is will conatin a subdirectory`<JKQTPLOTTER_INSTALL_DIR>/lib/cmake/JKQtPlottr6` with all necessary CMake-scripts. Here `<JKQTPLOTTER_INSTALL_DIR>` is the directory into which you installed JKQTPlotter.
|
||||||
|
|
||||||
|
@ -4,7 +4,6 @@
|
|||||||
* \ref JKQTCMakeLinkExample
|
* \ref JKQTCMakeLinkExample
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "jkqtpexampleapplication.h"
|
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include "jkqtplotter/jkqtplotter.h"
|
#include "jkqtplotter/jkqtplotter.h"
|
||||||
#include "jkqtplotter/graphs/jkqtpscatter.h"
|
#include "jkqtplotter/graphs/jkqtpscatter.h"
|
||||||
|
@ -15,11 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,11 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -18,11 +18,7 @@ if(CImg_FOUND)
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
target_link_libraries(${EXENAME} CImg::CImg)
|
target_link_libraries(${EXENAME} CImg::CImg)
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -18,11 +18,7 @@ if(OpenCV_FOUND)
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
include_directories(${EXENAME} ${OpenCV_INCLUDE_DIRS} )
|
include_directories(${EXENAME} ${OpenCV_INCLUDE_DIRS} )
|
||||||
target_link_libraries(${EXENAME} ${OpenCV_LIBS} )
|
target_link_libraries(${EXENAME} ${OpenCV_LIBS} )
|
||||||
|
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -17,11 +17,8 @@ set(UIS )
|
|||||||
|
|
||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTFastPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTFastPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTFastPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -16,11 +16,8 @@ set(UIS )
|
|||||||
|
|
||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTMathText${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTMathTextLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTMathTextSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -2,23 +2,8 @@
|
|||||||
JKQTMathText is a hand-written LaTeX-renderer for Qt (implemented in native C++, using Qt). It supports a large set of standard LaTeX markup and can render it to a QPainter.
|
JKQTMathText is a hand-written LaTeX-renderer for Qt (implemented in native C++, using Qt). It supports a large set of standard LaTeX markup and can render it to a QPainter.
|
||||||
|
|
||||||
This project (see `./examples/jkqtmathtext_simpletest/`) simply creates a QLabel (as a new window) that displays a rendered LaTeX equation (here the time-dependent Schrödinger equation).
|
This project (see `./examples/jkqtmathtext_simpletest/`) simply creates a QLabel (as a new window) that displays a rendered LaTeX equation (here the time-dependent Schrödinger equation).
|
||||||
The QMake project looks like this (see [`jkqtmathtext_simpletest.pro`](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.pro):
|
|
||||||
```.qmake
|
|
||||||
# include JKQTMathText source-code, including the open-source XITS fonts
|
|
||||||
include(../../lib/jkqtmathtext_with_xits.pri)
|
|
||||||
SOURCES += jkqtmathtext_simpletest.cpp
|
|
||||||
|
|
||||||
# if you don't want to use the XITS fonts, use this line (and uncomment the
|
The source code of the main application is (see [`jkqtmathtext_simpletest.cpp`](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp):
|
||||||
# last two line!):
|
|
||||||
#include(../../lib/jkqtmathtext.pri)
|
|
||||||
|
|
||||||
CONFIG += qt
|
|
||||||
QT += core gui
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
|
|
||||||
|
|
||||||
TARGET = jkqtmathtext_simpletest
|
|
||||||
```
|
|
||||||
And the source code of the main application is (see [`jkqtmathtext_simpletest.cpp`](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/jkqtmathtext_simpletest/jkqtmathtext_simpletest.cpp):
|
|
||||||
```.cpp
|
```.cpp
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
#include <QLabel>
|
#include <QLabel>
|
||||||
|
@ -17,11 +17,7 @@ set(UIS testform.ui )
|
|||||||
|
|
||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTMathText${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTMathTextLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTMathTextSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,12 +24,7 @@ set(UIS )
|
|||||||
|
|
||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
|
@ -1,22 +1,12 @@
|
|||||||
cmake_minimum_required(VERSION 3.15)
|
cmake_minimum_required(VERSION 3.15)
|
||||||
|
|
||||||
set(libBasename JKQTPExampleTools)
|
set(libBasename JKQTPExampleTools)
|
||||||
|
|
||||||
set(lib_name ${libBasename}Lib)
|
set(lib_name ${libBasename}Lib)
|
||||||
message( STATUS "-- Building ${lib_name}" )
|
message( STATUS "-- Building ${lib_name}" )
|
||||||
|
|
||||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
||||||
|
|
||||||
# Set up source files
|
|
||||||
set(SOURCES
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpexampleapplication.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpappsettingcontroller.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(HEADERS
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpexampleapplication.h
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpappsettingcontroller.h
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
include(CMakePackageConfigHelpers)
|
||||||
@ -45,13 +35,16 @@ endfunction()
|
|||||||
|
|
||||||
add_library(${lib_name} STATIC ${SOURCES} ${RESOURCES} ${HEADERS})
|
add_library(${lib_name} STATIC ${SOURCES} ${RESOURCES} ${HEADERS})
|
||||||
jkqtpexampletools_setDefaultLibOptions(${lib_name})
|
jkqtpexampletools_setDefaultLibOptions(${lib_name})
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${lib_name} PUBLIC ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${lib_name} PUBLIC JKQTPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${lib_name} PUBLIC JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake
|
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake
|
||||||
VERSION ${PROJECT_VERSION}
|
VERSION ${PROJECT_VERSION}
|
||||||
COMPATIBILITY AnyNewerVersion )
|
COMPATIBILITY AnyNewerVersion )
|
||||||
|
|
||||||
|
target_sources(${lib_name}
|
||||||
|
PUBLIC
|
||||||
|
jkqtpexampleapplication.h
|
||||||
|
jkqtpappsettingcontroller.h
|
||||||
|
PRIVATE
|
||||||
|
jkqtpexampleapplication.cpp
|
||||||
|
jkqtpappsettingcontroller.cpp
|
||||||
|
)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -16,13 +16,7 @@ set(UIS mandelbrotmainwindow.ui)
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
target_link_libraries(${EXENAME} Threads::Threads)
|
target_link_libraries(${EXENAME} Threads::Threads)
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
|
@ -15,13 +15,7 @@ set(UIS test_multiplot_ui.ui )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -16,12 +16,7 @@ add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
|||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../../lib)
|
target_include_directories(${EXENAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../../lib)
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
target_precompile_headers(${EXENAME} PRIVATE ../../lib/jkqtplotter/private/jkqtplotter_precomp.h)
|
target_precompile_headers(${EXENAME} PRIVATE ../../lib/jkqtplotter/private/jkqtplotter_precomp.h)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,12 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
target_precompile_headers(${EXENAME} PRIVATE ../../lib/jkqtplotter/private/jkqtplotter_precomp.h)
|
target_precompile_headers(${EXENAME} PRIVATE ../../lib/jkqtplotter/private/jkqtplotter_precomp.h)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -18,11 +18,7 @@ if(CImg_FOUND)
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
target_link_libraries(${EXENAME} CImg::CImg)
|
target_link_libraries(${EXENAME} CImg::CImg)
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
|
@ -18,11 +18,7 @@ if (OpenCV_FOUND)
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
include_directories(${EXENAME} ${OpenCV_INCLUDE_DIRS} )
|
include_directories(${EXENAME} ${OpenCV_INCLUDE_DIRS} )
|
||||||
target_link_libraries(${EXENAME} ${OpenCV_LIBS} )
|
target_link_libraries(${EXENAME} ${OpenCV_LIBS} )
|
||||||
|
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,12 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
target_precompile_headers(${EXENAME} PRIVATE ../../lib/jkqtplotter/private/jkqtplotter_precomp.h)
|
target_precompile_headers(${EXENAME} PRIVATE ../../lib/jkqtplotter/private/jkqtplotter_precomp.h)
|
||||||
|
@ -15,12 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
target_precompile_headers(${EXENAME} PRIVATE ../../lib/jkqtplotter/private/jkqtplotter_precomp.h)
|
target_precompile_headers(${EXENAME} PRIVATE ../../lib/jkqtplotter/private/jkqtplotter_precomp.h)
|
||||||
|
@ -15,11 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,12 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
target_precompile_headers(${EXENAME} PRIVATE ../../lib/jkqtplotter/private/jkqtplotter_precomp.h)
|
target_precompile_headers(${EXENAME} PRIVATE ../../lib/jkqtplotter/private/jkqtplotter_precomp.h)
|
||||||
|
@ -1,44 +1,7 @@
|
|||||||
# Example (JKQTPlotter): Very simple line-graph {#JKQTPlotterSimpleTest}
|
# Example (JKQTPlotter): Very simple line-graph {#JKQTPlotterSimpleTest}
|
||||||
This project (see `./examples/simpletest/`) simply creates a JKQTPlotter widget (as a new window) and adds a single line-graph (a sine-wave). Data is initialized from two QVector<double> objects.
|
This project (see `./examples/simpletest/`) simply creates a JKQTPlotter widget (as a new window) and adds a single line-graph (a sine-wave). Data is initialized from two QVector<double> objects.
|
||||||
The QMake project looks like this (see [`jkqtplotter_simpletest.pro`](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest/jkqtplotter_simpletest.pro):
|
|
||||||
```.qmake
|
|
||||||
# source code for this simple demo
|
|
||||||
SOURCES = jkqtplotter_simpletest.cpp
|
|
||||||
|
|
||||||
# configure Qt
|
|
||||||
CONFIG += qt
|
|
||||||
QT += core gui xml svg
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
|
|
||||||
|
|
||||||
# output executable name
|
|
||||||
TARGET = jkqtplotter_simpletest
|
|
||||||
|
|
||||||
# include JKQTPlotter source headers and link against library
|
|
||||||
DEPENDPATH += ../../lib ../../qmake/staticlib/jkqtplotterlib
|
|
||||||
INCLUDEPATH += ../../lib
|
|
||||||
CONFIG (debug, debug|release) {
|
|
||||||
LIBS += -L../../qmake/staticlib/jkqtplotterlib/debug -ljkqtplotterlib_debug
|
|
||||||
} else {
|
|
||||||
LIBS += -L../../qmake/staticlib/jkqtplotterlib/release -ljkqtplotterlib
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
Alternatively to linking agains a `libjkqtplotter`, you can also directy add the JKQTPlotter sources to the project:
|
|
||||||
```.qmake
|
|
||||||
# source code for this simple demo
|
|
||||||
SOURCES = jkqtplotter_simpletest.cpp
|
|
||||||
|
|
||||||
# configure Qt
|
|
||||||
CONFIG += qt
|
|
||||||
QT += core gui svg
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
|
|
||||||
|
|
||||||
# output executable name
|
|
||||||
TARGET = jkqtplotter_simpletest
|
|
||||||
|
|
||||||
# include JKQTPlotter source code
|
|
||||||
include(../../lib/jkqtplotter.pri)
|
|
||||||
```
|
|
||||||
The source code of the main application is (see [`jkqtplotter_simpletest.cpp`](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest/jkqtplotter_simpletest.cpp):
|
The source code of the main application is (see [`jkqtplotter_simpletest.cpp`](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/simpletest/jkqtplotter_simpletest.cpp):
|
||||||
```.cpp
|
```.cpp
|
||||||
#include <QApplication>
|
#include <QApplication>
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS test_styling.ui )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS formwithjkqtplotter.ui )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -16,45 +16,7 @@ For this to work you have to follow the steps shown below:
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
# QMake-Project of this example
|
In the example, there is a main CPP-file (shown below) and a `formwithjkqtplotter.ui`-file with the `formwithjkqtplotter.cpp/.h`-files that are used to implement the functionality behind the form (see next chapter).
|
||||||
|
|
||||||
The QMake project for such a project looks like this (see [`ui.pro`](https://github.com/jkriege2/JKQtPlotter/tree/master/examples/ui/ui.pro):
|
|
||||||
```.qmake
|
|
||||||
# source code for this simple demo
|
|
||||||
SOURCES = ui.cpp \
|
|
||||||
formwithjkqtplotter.cpp
|
|
||||||
|
|
||||||
FORMS += formwithjkqtplotter.ui
|
|
||||||
|
|
||||||
HEADERS += formwithjkqtplotter.h
|
|
||||||
|
|
||||||
# configure Qt
|
|
||||||
CONFIG += qt
|
|
||||||
QT += core gui xml svg
|
|
||||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets printsupport
|
|
||||||
|
|
||||||
# output executable name
|
|
||||||
TARGET = ui
|
|
||||||
|
|
||||||
# include JKQTPlotter source headers and link against library
|
|
||||||
DEPENDPATH += ../../lib ../../qmake/staticlib/jkqtplotterlib
|
|
||||||
INCLUDEPATH += ../../lib
|
|
||||||
CONFIG (debug, debug|release) {
|
|
||||||
LIBS += -L../../qmake/staticlib/jkqtplotterlib/debug -ljkqtplotterlib_debug
|
|
||||||
} else {
|
|
||||||
LIBS += -L../../qmake/staticlib/jkqtplotterlib/release -ljkqtplotterlib
|
|
||||||
}
|
|
||||||
message("LIBS = $$LIBS")
|
|
||||||
|
|
||||||
win32-msvc*: DEFINES += _USE_MATH_DEFINES
|
|
||||||
win32-msvc*: DEFINES += NOMINMAX
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
```
|
|
||||||
|
|
||||||
As you can see there is a main CPP-file (shown below) and a `formwithjkqtplotter.ui`-file with the `formwithjkqtplotter.cpp/.h`-files that are used to implement the functionality behind the form (see next chapter).
|
|
||||||
|
|
||||||
The source code of the main application is simply instanciating the Form class `FormWithJKQTPlotter` from `formwithjkqtplotter.ui/.h/.cpp`:
|
The source code of the main application is simply instanciating the Form class `FormWithJKQTPlotter` from `formwithjkqtplotter.ui/.h/.cpp`:
|
||||||
```.cpp
|
```.cpp
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -15,13 +15,7 @@ set(UIS )
|
|||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
# precomiled headers to speed up compilation
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -6,45 +6,66 @@ message( STATUS )
|
|||||||
message( STATUS "=============================================================================" )
|
message( STATUS "=============================================================================" )
|
||||||
message( STATUS "== JKQTPlotterLib Build Information ==" )
|
message( STATUS "== JKQTPlotterLib Build Information ==" )
|
||||||
message( STATUS "=============================================================================" )
|
message( STATUS "=============================================================================" )
|
||||||
message( STATUS "Version: ${PROJECT_VERSION}")
|
message( STATUS "Version: ${PROJECT_VERSION}")
|
||||||
message( STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
message( STATUS "Build type: ${CMAKE_BUILD_TYPE}")
|
||||||
message( STATUS "Build types: ${CMAKE_CONFIGURATION_TYPES}")
|
message( STATUS "Build types: ${CMAKE_CONFIGURATION_TYPES}")
|
||||||
message( STATUS "Using CMake: ${CMAKE_VERSION}")
|
message( STATUS "Build shared lib: ${BUILD_SHARED_LIBS}")
|
||||||
message( STATUS " Generator: ${CMAKE_GENERATOR}")
|
message( STATUS "Using CMake: ${CMAKE_VERSION}")
|
||||||
message( STATUS "Using compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}, platform: ${CMAKE_CXX_PLATFORM_ID}" )
|
message( STATUS "Using CMake Generator: ${CMAKE_GENERATOR}")
|
||||||
message( STATUS "C++ Standard: C++ ${JKQtPlotter_QT_CXX_STANDARD}, required: ${JKQtPlotter_QT_CXX_STANDARD_REQUIRED}" )
|
message( STATUS "Using compiler: ${CMAKE_CXX_COMPILER_ID} ${CMAKE_CXX_COMPILER_VERSION}, platform: ${CMAKE_CXX_PLATFORM_ID}" )
|
||||||
message( STATUS "LIB-Architecture: CXX: ${CMAKE_CXX_LIBRARY_ARCHITECTURE} / BASE: ${CMAKE_LIBRARY_ARCHITECTURE}" )
|
message( STATUS "C++ Standard: C++ ${JKQtPlotter_QT_CXX_STANDARD}, required: ${JKQtPlotter_QT_CXX_STANDARD_REQUIRED}" )
|
||||||
message( STATUS "bit depth: ${JKQtPlotter_BIT_DEPTH} bit" )
|
message( STATUS "LIB-Architecture: CXX: ${CMAKE_CXX_LIBRARY_ARCHITECTURE} / BASE: ${CMAKE_LIBRARY_ARCHITECTURE}" )
|
||||||
message( STATUS "System Name: ${CMAKE_SYSTEM_NAME}" )
|
message( STATUS "bit depth: ${JKQtPlotter_BIT_DEPTH} bit" )
|
||||||
message( STATUS "Processor Name: ${CMAKE_SYSTEM_PROCESSOR}" )
|
message( STATUS "System Name: ${CMAKE_SYSTEM_NAME}" )
|
||||||
message( STATUS "Using Qt: ${QT_VERSION}" )
|
message( STATUS "Processor Name: ${CMAKE_SYSTEM_PROCESSOR}" )
|
||||||
|
message( STATUS "Using Qt: ${QT_VERSION}" )
|
||||||
message( STATUS " [at ${QT_DIR}]" )
|
message( STATUS " [at ${QT_DIR}]" )
|
||||||
if(JKQtPlotter_BUILD_INCLUDE_XITS_FONTS)
|
if(JKQtPlotter_BUILD_INCLUDE_XITS_FONTS)
|
||||||
message( STATUS "XITS fonts: LINKED IN" )
|
message( STATUS "XITS fonts: LINKED IN" )
|
||||||
else()
|
else()
|
||||||
message( STATUS "XITS fonts: NOT AVAILABLE IN LIB" )
|
message( STATUS "XITS fonts: NOT AVAILABLE IN LIB" )
|
||||||
endif(JKQtPlotter_BUILD_INCLUDE_XITS_FONTS)
|
endif(JKQtPlotter_BUILD_INCLUDE_XITS_FONTS)
|
||||||
if(JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS)
|
if(JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS)
|
||||||
message( STATUS "FIRA fonts: LINKED IN" )
|
message( STATUS "FIRA fonts: LINKED IN" )
|
||||||
else()
|
else()
|
||||||
message( STATUS "FIRA fonts: NOT AVAILABLE IN LIB" )
|
message( STATUS "FIRA fonts: NOT AVAILABLE IN LIB" )
|
||||||
endif(JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS)
|
endif(JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS)
|
||||||
if(${JKQtPlotter_HAS_NO_PRINTER_SUPPORT})
|
if(${JKQtPlotter_HAS_NO_PRINTER_SUPPORT})
|
||||||
message( STATUS "Print support: OFF" )
|
message( STATUS "Print support: OFF" )
|
||||||
else()
|
else()
|
||||||
message( STATUS "Print support: ON" )
|
message( STATUS "Print support: ON" )
|
||||||
endif()
|
endif()
|
||||||
if(${JKQtPlotter_BUILD_WITH_TIMING_INFO_OUTPUT})
|
if(${JKQtPlotter_BUILD_WITH_TIMING_INFO_OUTPUT})
|
||||||
message( STATUS "Timing Info output: OFF" )
|
message( STATUS "Timing Info output: OFF" )
|
||||||
else()
|
else()
|
||||||
message( STATUS "Timing Info output: ON" )
|
message( STATUS "Timing Info output: ON" )
|
||||||
endif()
|
endif()
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
||||||
message( STATUS "Precompiled Header: ON" )
|
message( STATUS "Precompiled Header: ON" )
|
||||||
else()
|
else()
|
||||||
message( STATUS "Precompiled Header: OFF")
|
message( STATUS "Precompiled Header: OFF")
|
||||||
endif()
|
endif()
|
||||||
message( STATUS "Installing to: ${CMAKE_INSTALL_PREFIX}" )
|
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 )
|
||||||
|
|
||||||
@ -56,13 +77,26 @@ message( STATUS "...............................................................
|
|||||||
|
|
||||||
set(JKQTPLOTTER_VERSION_FILE_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
set(JKQTPLOTTER_VERSION_FILE_DIR ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
set(JKQTPLOTTER_VERSION_FILE ${JKQTPLOTTER_VERSION_FILE_DIR}/jkqtplotter_version.h)
|
set(JKQTPLOTTER_VERSION_FILE ${JKQTPLOTTER_VERSION_FILE_DIR}/jkqtplotter_version.h)
|
||||||
configure_file(${CMAKE_CURRENT_LIST_DIR}/jkqtplotter_version.h.in
|
configure_file(${CMAKE_CURRENT_LIST_DIR}/jkqtplotter_version.h.in ${JKQTPLOTTER_VERSION_FILE})
|
||||||
${JKQTPLOTTER_VERSION_FILE})
|
|
||||||
|
|
||||||
include_directories(.)
|
include_directories(.)
|
||||||
|
|
||||||
|
# this library is the base for ALL other libraries, so it is always built!
|
||||||
add_subdirectory(jkqtcommon)
|
add_subdirectory(jkqtcommon)
|
||||||
add_subdirectory(jkqtmath)
|
|
||||||
add_subdirectory(jkqtmathtext)
|
# all other libraries are built only, when activated by CMake options
|
||||||
add_subdirectory(jkqtfastplotter)
|
if (JKQtPlotter_BUILD_LIB_JKQTMATH)
|
||||||
add_subdirectory(jkqtplotter)
|
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()
|
||||||
|
@ -1,142 +1,57 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
set(libBasename JKQTCommon)
|
set(libBaseName JKQTCommon)
|
||||||
set(libIncludeSubdir jkqtcommon)
|
set(lib_name ${libBaseName}${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
message( STATUS "-- Building ${lib_name}" )
|
||||||
set(libsh_name ${libBasename}SharedLib)
|
|
||||||
set(libsh_name_decorated ${libsh_name}${JKQtPlotter_LIBNAME_ADDITION})
|
|
||||||
set(${libBasename}_SHARED_LIBRARY ${libsh_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE)
|
|
||||||
message( STATUS "-- Building ${libsh_name}" )
|
|
||||||
endif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
# create the library (SHARED/STATIC is controlled by the CMake option BUILD_SHARED_LIBS
|
||||||
set(lib_name ${libBasename}Lib)
|
jkqtplotter_add_library(${lib_name} )
|
||||||
set(lib_name_decorated ${lib_name}${JKQtPlotter_LIBNAME_ADDITION})
|
|
||||||
set(${libBasename}_STATIC_LIBRARY ${lib_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE)
|
|
||||||
message( STATUS "-- Building ${lib_name}" )
|
|
||||||
endif(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
|
|
||||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
# set all default library options
|
||||||
|
jkqtplotter_setDefaultLibOptions(${lib_name} ${libBaseName} "${CMAKE_CURRENT_LIST_DIR}/private/jkqtcommon_precomp.h")
|
||||||
|
|
||||||
# Set up source files
|
# DEPENDENCIES: Qt
|
||||||
set(SOURCES
|
target_link_libraries(${lib_name} PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Xml Qt${QT_VERSION_MAJOR}::Widgets)
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpdebuggingtools.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpmathtools.cpp
|
# add source files
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpstringtools.cpp
|
target_sources(${lib_name} PRIVATE
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpcodestructuring.cpp
|
jkqtpdebuggingtools.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpbasicimagetools.cpp
|
jkqtpmathtools.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpconcurrencytools.cpp
|
jkqtpstringtools.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpcachingtools.cpp
|
jkqtpcodestructuring.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpgeometrytools.cpp
|
jkqtpbasicimagetools.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpdrawingtools.cpp
|
jkqtpconcurrencytools.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpenhancedpainter.cpp
|
jkqtpcachingtools.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtphighrestimer.cpp
|
jkqtpgeometrytools.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqttools.cpp
|
jkqtpdrawingtools.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpicons.cpp
|
jkqtpenhancedpainter.cpp
|
||||||
|
jkqtphighrestimer.cpp
|
||||||
|
jkqttools.cpp
|
||||||
|
jkqtpicons.cpp
|
||||||
)
|
)
|
||||||
|
# ... and add headers
|
||||||
set(HEADERS
|
target_sources(${lib_name} PUBLIC FILE_SET HEADERS TYPE HEADERS
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtcommon_imexport.h>
|
FILES
|
||||||
$<INSTALL_INTERFACE:jkqtcommon_imexport.h>
|
jkqtcommon_imexport.h
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpdebuggingtools.h>
|
jkqtpdebuggingtools.h
|
||||||
$<INSTALL_INTERFACE:jkqtpdebuggingtools.h>
|
jkqtpmathtools.h
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpmathtools.h>
|
jkqtpstringtools.h
|
||||||
$<INSTALL_INTERFACE:jkqtpmathtools.h>
|
jkqtpcodestructuring.h
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstringtools.h>
|
jkqtpbasicimagetools.h
|
||||||
$<INSTALL_INTERFACE:jkqtpstringtools.h>
|
jkqtpdrawingtools.h
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpcodestructuring.h>
|
jkqtpenhancedpainter.h
|
||||||
$<INSTALL_INTERFACE:jkqtpcodestructuring.h>
|
jkqtphighrestimer.h
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpbasicimagetools.h>
|
jkqttools.h
|
||||||
$<INSTALL_INTERFACE:jkqtpbasicimagetools.h>
|
jkqtpicons.h
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpdrawingtools.h>
|
jkqtpgeometrytools.h
|
||||||
$<INSTALL_INTERFACE:jkqtpdrawingtools.h>
|
jkqtpconcurrencytools.h
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpenhancedpainter.h>
|
jkqtpcachingtools.h
|
||||||
$<INSTALL_INTERFACE:jkqtpenhancedpainter.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtphighrestimer.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtphighrestimer.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqttools.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqttools.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpicons.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpicons.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpgeometrytools.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpgeometrytools.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpconcurrencytools.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpconcurrencytools.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpcachingtools.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpcachingtools.h>
|
|
||||||
)
|
)
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
|
||||||
|
|
||||||
function(JKQtCommon_setDefaultLibOptions TARGETNAME)
|
|
||||||
set_property(TARGET ${TARGETNAME} PROPERTY VERSION "${PROJECT_VERSION}")
|
|
||||||
target_link_libraries(${TARGETNAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Xml Qt${QT_VERSION_MAJOR}::Widgets)
|
|
||||||
set_property(TARGET ${TARGETNAME} PROPERTY CXX_STANDARD ${JKQtPlotter_QT_CXX_STANDARD})
|
|
||||||
set_property(TARGET ${TARGETNAME} PROPERTY CXX_STANDARD_REQUIRED ${JKQtPlotter_QT_CXX_STANDARD_REQUIRED})
|
|
||||||
target_compile_features(${TARGETNAME} PUBLIC ${JKQtPlotter_QT_CXX_COMPILE_FEATURE})
|
|
||||||
if(MINGW)
|
|
||||||
# COMPILER-SETTINGS FOR MINGW
|
|
||||||
target_compile_options(${TARGETNAME} PUBLIC -fexceptions)
|
|
||||||
elseif(MSVC)
|
|
||||||
# COMPILER-SETTINGS FOR MS VISUAL C++
|
|
||||||
target_compile_options(${TARGETNAME} PUBLIC /EHsc)
|
|
||||||
target_compile_definitions(${TARGETNAME} PUBLIC NOMINMAX)
|
|
||||||
endif()
|
|
||||||
if(JKQtPlotter_BUILD_WITH_TIMING_INFO_OUTPUT)
|
|
||||||
target_compile_definitions(${TARGETNAME} PRIVATE JKQTBP_AUTOTIMER)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_include_directories(${TARGETNAME} PUBLIC
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/../>
|
|
||||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
|
||||||
)
|
|
||||||
# precomiled headers to speed up compilation
|
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
|
||||||
target_precompile_headers(${TARGETNAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/private/jkqtcommon_precomp.h)
|
|
||||||
target_sources(${TARGETNAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/private/jkqtcommon_precomp.h)
|
|
||||||
endif(JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
add_library(${libsh_name} SHARED ${SOURCES} ${HEADERS} )
|
|
||||||
JKQtCommon_setDefaultLibOptions(${libsh_name})
|
|
||||||
set_property(TARGET ${libsh_name} PROPERTY OUTPUT_NAME "${libsh_name_decorated}")
|
|
||||||
target_compile_definitions(${libsh_name} PUBLIC JKQTCOMMON_LIB_IN_DLL)
|
|
||||||
target_compile_definitions(${libsh_name} PRIVATE JKQTCOMMON_LIB_EXPORT_LIBRARY)
|
|
||||||
set_target_properties(${libsh_name} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS "ON")
|
|
||||||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Version.cmake
|
|
||||||
VERSION ${PROJECT_VERSION}
|
|
||||||
COMPATIBILITY AnyNewerVersion )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
add_library(${lib_name} STATIC ${SOURCES} ${HEADERS})
|
|
||||||
JKQtCommon_setDefaultLibOptions(${lib_name})
|
|
||||||
set_property(TARGET ${lib_name} PROPERTY OUTPUT_NAME "${lib_name_decorated}")
|
|
||||||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake
|
|
||||||
VERSION ${PROJECT_VERSION}
|
|
||||||
COMPATIBILITY AnyNewerVersion )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
jkqtplotter_installlibrary_new(${lib_name} ${libBaseName} ${CMAKE_CURRENT_LIST_DIR})
|
||||||
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir} "Shared")
|
|
||||||
endif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir} "")
|
|
||||||
endif(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
|
|
||||||
install(FILES ${HEADERS}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
|
|
||||||
COMPONENT Headers)
|
|
||||||
|
|
||||||
|
|
||||||
configure_file(${PROJECT_SOURCE_DIR}/readme.txt.in ${CMAKE_CURRENT_BINARY_DIR}/${libBasename}_Readme.txt @ONLY)
|
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libBasename}_Readme.txt" DESTINATION doc/JKQtPlotter )
|
|
||||||
install(FILES "${PROJECT_SOURCE_DIR}/LICENSE" DESTINATION doc/JKQtPlotter RENAME "${libBasename}_LICENSE.txt" )
|
|
||||||
|
|
||||||
|
@ -1,102 +1,36 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
set(libBasename JKQTFastPlotter)
|
set(libBaseName JKQTFastPlotter)
|
||||||
set(libIncludeSubdir jkqtfastplotter)
|
set(lib_name ${libBaseName}${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
message( STATUS "-- Building ${lib_name}" )
|
||||||
set(libsh_name ${libBasename}SharedLib)
|
message(WARNING "-- You are building the sub-library JKQTFastPlotter, which is DEPRECTAED and may be removed in future!")
|
||||||
set(libsh_name_decorated ${libsh_name}${JKQtPlotter_LIBNAME_ADDITION})
|
|
||||||
set(${libBasename}_SHARED_LIBRARY ${libsh_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE)
|
|
||||||
message( STATUS "-- Building ${libsh_name}" )
|
|
||||||
endif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
# create the library (SHARED/STATIC is controlled by the CMake option BUILD_SHARED_LIBS
|
||||||
set(lib_name ${libBasename}Lib)
|
jkqtplotter_add_library(${lib_name} )
|
||||||
set(lib_name_decorated ${lib_name}${JKQtPlotter_LIBNAME_ADDITION})
|
|
||||||
set(${libBasename}_STATIC_LIBRARY ${lib_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE)
|
|
||||||
message( STATUS "-- Building ${lib_name}" )
|
|
||||||
endif(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
|
|
||||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
# set all default library options
|
||||||
|
jkqtplotter_setDefaultLibOptions(${lib_name} ${libBaseName} "")
|
||||||
|
|
||||||
# Set up source files
|
# DEPENDENCIES: Qt
|
||||||
set(SOURCES
|
target_link_libraries(${lib_name} PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::OpenGL Qt${QT_VERSION_MAJOR}::Widgets)
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtfastplotter.cpp
|
if(${QT_VERSION_MAJOR} VERSION_GREATER_EQUAL "6")
|
||||||
)
|
target_link_libraries(${lib_name} PUBLIC Qt${QT_VERSION_MAJOR}::OpenGLWidgets)
|
||||||
|
|
||||||
set(HEADERS
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtfastplotter.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtfastplotter.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtfastplotter_imexport.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtfastplotter_imexport.h>
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
|
||||||
|
|
||||||
function(JKQtFastPlotter_setDefaultLibOptions TARGETNAME)
|
|
||||||
set_property(TARGET ${TARGETNAME} PROPERTY VERSION "${PROJECT_VERSION}")
|
|
||||||
target_link_libraries(${TARGETNAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::OpenGL Qt${QT_VERSION_MAJOR}::Widgets)
|
|
||||||
set_property(TARGET ${TARGETNAME} PROPERTY CXX_STANDARD ${JKQtPlotter_QT_CXX_STANDARD})
|
|
||||||
set_property(TARGET ${TARGETNAME} PROPERTY CXX_STANDARD_REQUIRED ${JKQtPlotter_QT_CXX_STANDARD_REQUIRED})
|
|
||||||
target_compile_features(${TARGETNAME} PUBLIC ${JKQtPlotter_QT_CXX_COMPILE_FEATURE})
|
|
||||||
if(${QT_VERSION_MAJOR} VERSION_GREATER_EQUAL "6")
|
|
||||||
target_link_libraries(${TARGETNAME} PUBLIC Qt${QT_VERSION_MAJOR}::OpenGLWidgets)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(MINGW)
|
|
||||||
# COMPILER-SETTINGS FOR MINGW
|
|
||||||
target_compile_options(${TARGETNAME} PUBLIC -fexceptions)
|
|
||||||
elseif(MSVC)
|
|
||||||
# COMPILER-SETTINGS FOR MS VISUAL C++
|
|
||||||
target_compile_options(${TARGETNAME} PUBLIC /EHsc)
|
|
||||||
target_compile_definitions(${TARGETNAME} PUBLIC NOMINMAX)
|
|
||||||
endif()
|
|
||||||
target_include_directories(${TARGETNAME} PUBLIC
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/../>
|
|
||||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
|
||||||
)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
add_library(${libsh_name} SHARED ${SOURCES} ${RESOURCES} ${HEADERS})
|
|
||||||
JKQtFastPlotter_setDefaultLibOptions(${libsh_name})
|
|
||||||
set_property(TARGET ${libsh_name} PROPERTY OUTPUT_NAME "${libsh_name_decorated}")
|
|
||||||
target_link_libraries(${libsh_name} PUBLIC JKQTCommonSharedLib)
|
|
||||||
target_compile_definitions(${libsh_name} PUBLIC JKQTFASTPLOTTER_LIB_IN_DLL)
|
|
||||||
target_compile_definitions(${libsh_name} PRIVATE JKQTFASTPLOTTER_LIB_EXPORT_LIBRARY)
|
|
||||||
set_target_properties(${libsh_name} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS "ON")
|
|
||||||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Version.cmake
|
|
||||||
VERSION ${PROJECT_VERSION}
|
|
||||||
COMPATIBILITY AnyNewerVersion )
|
|
||||||
endif()
|
endif()
|
||||||
|
target_link_libraries(${lib_name} PUBLIC ${jkqtplotter_namespace}JKQTCommon${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
# add source files
|
||||||
add_library(${lib_name} STATIC ${SOURCES} ${RESOURCES} ${HEADERS})
|
target_sources(${lib_name} PRIVATE
|
||||||
JKQtFastPlotter_setDefaultLibOptions(${lib_name})
|
jkqtfastplotter.cpp
|
||||||
set_property(TARGET ${lib_name} PROPERTY OUTPUT_NAME "${lib_name_decorated}")
|
)
|
||||||
target_link_libraries(${lib_name} PUBLIC JKQTCommonLib)
|
# ... and add headers
|
||||||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake
|
target_sources(${lib_name} PUBLIC FILE_SET HEADERS TYPE HEADERS
|
||||||
VERSION ${PROJECT_VERSION}
|
FILES
|
||||||
COMPATIBILITY AnyNewerVersion )
|
jkqtfastplotter_imexport.h
|
||||||
endif()
|
jkqtfastplotter.h
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
jkqtplotter_installlibrary_new(${lib_name} ${libBaseName} ${CMAKE_CURRENT_LIST_DIR})
|
||||||
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir} "Shared")
|
|
||||||
endif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir} "")
|
|
||||||
endif(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
|
|
||||||
install(FILES ${HEADERS}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
|
|
||||||
COMPONENT Headers)
|
|
||||||
|
|
||||||
configure_file(${PROJECT_SOURCE_DIR}/readme.txt.in ${CMAKE_CURRENT_BINARY_DIR}/${libBasename}_Readme.txt @ONLY)
|
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libBasename}_Readme.txt" DESTINATION doc/JKQtPlotter )
|
|
||||||
install(FILES "${PROJECT_SOURCE_DIR}/LICENSE" DESTINATION doc/JKQtPlotter RENAME "${libBasename}_LICENSE.txt" )
|
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ find_package(Qt@QT_VERSION_MAJOR@ COMPONENTS Core Gui Widgets OpenGL REQUIRED)
|
|||||||
if(${QT_VERSION_MAJOR} VERSION_GREATER_EQUAL "6")
|
if(${QT_VERSION_MAJOR} VERSION_GREATER_EQUAL "6")
|
||||||
find_package(Qt@QT_VERSION_MAJOR@ REQUIRED COMPONENTS OpenGLWidgets)
|
find_package(Qt@QT_VERSION_MAJOR@ REQUIRED COMPONENTS OpenGLWidgets)
|
||||||
endif()
|
endif()
|
||||||
find_package(JKQTCommon@JKQTP_CURRENT_TARGET_SHAREDPART@Lib REQUIRED PATHS ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
|
find_package(JKQTCommon@jkqtplotter_LIBNAME_VERSION_PART@ REQUIRED PATHS ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
# include auto-generated targets.cmake file
|
# include auto-generated targets.cmake file
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/@JKQTP_CURRENT_TARGET_FILENAME@")
|
include("${CMAKE_CURRENT_LIST_DIR}/@JKQTP_CURRENT_TARGET_FILENAME@")
|
||||||
|
@ -1,143 +1,52 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
set(libBasename JKQTMath)
|
set(libBaseName JKQTMath)
|
||||||
set(oldlibBasename JKQTCommonStatisticsAndMath)
|
set(lib_name ${libBaseName}${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
set(libIncludeSubdir jkqtmath)
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
message( STATUS "-- Building ${lib_name}" )
|
||||||
set(libsh_name ${libBasename}SharedLib)
|
|
||||||
set(libsh_name_decorated ${libsh_name}${JKQtPlotter_LIBNAME_ADDITION})
|
|
||||||
set(oldlibsh_name ${oldlibBasename}SharedLib)
|
|
||||||
set(oldlibsh_name_decorated ${oldlibsh_name}${JKQtPlotter_LIBNAME_ADDITION})
|
|
||||||
set(${libBasename}_SHARED_LIBRARY ${libsh_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE)
|
|
||||||
message( STATUS "-- Building ${libsh_name}" )
|
|
||||||
endif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
# create the library (SHARED/STATIC is controlled by the CMake option BUILD_SHARED_LIBS
|
||||||
set(lib_name ${libBasename}Lib)
|
jkqtplotter_add_library(${lib_name} )
|
||||||
set(lib_name_decorated ${lib_name}${JKQtPlotter_LIBNAME_ADDITION})
|
|
||||||
set(oldlib_name ${oldlibBasename}Lib)
|
|
||||||
set(oldlib_name_decorated ${oldlib_name}${JKQtPlotter_LIBNAME_ADDITION})
|
|
||||||
set(${libBasename}_STATIC_LIBRARY ${lib_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE)
|
|
||||||
message( STATUS "-- Building ${lib_name}" )
|
|
||||||
endif(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
|
|
||||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
# set all default library options
|
||||||
|
jkqtplotter_setDefaultLibOptions(${lib_name} ${libBaseName} "${CMAKE_CURRENT_LIST_DIR}/private/jkqtmath_precomp.h")
|
||||||
|
|
||||||
# Set up source files
|
# DEPENDENCIES: Qt
|
||||||
set(SOURCES
|
target_link_libraries(${lib_name} PUBLIC Qt${QT_VERSION_MAJOR}::Core)
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpalgorithms.cpp
|
target_link_libraries(${lib_name} PUBLIC ${jkqtplotter_namespace}JKQTCommon${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtplinalgtools.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpmathparser.cpp
|
# add source files
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtparraytools.cpp
|
target_sources(${lib_name} PRIVATE
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpstatbasics.cpp
|
jkqtpalgorithms.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpstathistogram.cpp
|
jkqtplinalgtools.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpstatkde.cpp
|
jkqtpmathparser.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpstatregression.cpp
|
jkqtparraytools.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpstatpoly.cpp
|
jkqtpstatbasics.cpp
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpstatgrouped.cpp
|
jkqtpstathistogram.cpp
|
||||||
|
jkqtpstatkde.cpp
|
||||||
|
jkqtpstatregression.cpp
|
||||||
|
jkqtpstatpoly.cpp
|
||||||
|
jkqtpstatgrouped.cpp
|
||||||
)
|
)
|
||||||
|
# ... and add headers
|
||||||
|
target_sources(${lib_name} PUBLIC FILE_SET HEADERS TYPE HEADERS
|
||||||
|
FILES
|
||||||
|
jkqtmath_imexport.h
|
||||||
|
jkqtpalgorithms.h
|
||||||
|
jkqtplinalgtools.h
|
||||||
|
jkqtpmathparser.h
|
||||||
|
jkqtparraytools.h
|
||||||
|
jkqtpstatisticstools.h
|
||||||
|
jkqtpstatbasics.h
|
||||||
|
jkqtpstathistogram.h
|
||||||
|
jkqtpstatkde.h
|
||||||
|
jkqtpstatregression.h
|
||||||
|
jkqtpstatpoly.h
|
||||||
|
jkqtpstatgrouped.h
|
||||||
|
|
||||||
set(HEADERS
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtmath_imexport.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtmath_imexport.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpalgorithms.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpalgorithms.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtplinalgtools.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtplinalgtools.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpmathparser.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpmathparser.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtparraytools.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtparraytools.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatisticstools.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpstatisticstools.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatbasics.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpstatbasics.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstathistogram.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpstathistogram.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatkde.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpstatkde.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatregression.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpstatregression.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatpoly.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpstatpoly.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpstatgrouped.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpstatgrouped.h>
|
|
||||||
)
|
)
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
|
||||||
|
|
||||||
function(JKQtCommon_setDefaultLibOptions TARGETNAME)
|
|
||||||
set_property(TARGET ${TARGETNAME} PROPERTY VERSION "${PROJECT_VERSION}")
|
|
||||||
target_link_libraries(${TARGETNAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core )
|
|
||||||
set_property(TARGET ${TARGETNAME} PROPERTY CXX_STANDARD ${JKQtPlotter_QT_CXX_STANDARD})
|
|
||||||
set_property(TARGET ${TARGETNAME} PROPERTY CXX_STANDARD_REQUIRED ${JKQtPlotter_QT_CXX_STANDARD_REQUIRED})
|
|
||||||
target_compile_features(${TARGETNAME} PUBLIC ${JKQtPlotter_QT_CXX_COMPILE_FEATURE})
|
|
||||||
if(MINGW)
|
|
||||||
# COMPILER-SETTINGS FOR MINGW
|
|
||||||
target_compile_options(${TARGETNAME} PUBLIC -fexceptions)
|
|
||||||
elseif(MSVC)
|
|
||||||
# COMPILER-SETTINGS FOR MS VISUAL C++
|
|
||||||
target_compile_options(${TARGETNAME} PUBLIC /EHsc)
|
|
||||||
target_compile_definitions(${TARGETNAME} PUBLIC NOMINMAX)
|
|
||||||
endif()
|
|
||||||
if(JKQtPlotter_BUILD_WITH_TIMING_INFO_OUTPUT)
|
|
||||||
target_compile_definitions(${TARGETNAME} PRIVATE JKQTBP_AUTOTIMER)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
target_include_directories(${TARGETNAME} PUBLIC
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/../>
|
|
||||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
|
||||||
)
|
|
||||||
# precomiled headers to speed up compilation
|
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
|
||||||
target_precompile_headers(${TARGETNAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/private/jkqtmath_precomp.h)
|
|
||||||
target_sources(${TARGETNAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/private/jkqtmath_precomp.h)
|
|
||||||
endif(JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
add_library(${libsh_name} SHARED ${SOURCES} ${HEADERS} )
|
|
||||||
JKQtCommon_setDefaultLibOptions(${libsh_name})
|
|
||||||
set_property(TARGET ${libsh_name} PROPERTY OUTPUT_NAME "${libsh_name_decorated}")
|
|
||||||
target_compile_definitions(${libsh_name} PUBLIC jkqtmath_LIB_IN_DLL)
|
|
||||||
target_compile_definitions(${libsh_name} PRIVATE jkqtmath_LIB_EXPORT_LIBRARY)
|
|
||||||
target_link_libraries(${libsh_name} PUBLIC JKQTCommonSharedLib)
|
|
||||||
set_target_properties(${libsh_name} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS "ON")
|
|
||||||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Version.cmake
|
|
||||||
VERSION ${PROJECT_VERSION}
|
|
||||||
COMPATIBILITY AnyNewerVersion )
|
|
||||||
add_library(${oldlibsh_name} ALIAS ${libsh_name})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
add_library(${lib_name} STATIC ${SOURCES} ${HEADERS})
|
|
||||||
JKQtCommon_setDefaultLibOptions(${lib_name})
|
|
||||||
target_link_libraries(${lib_name} PUBLIC JKQTCommonLib)
|
|
||||||
set_property(TARGET ${lib_name} PROPERTY OUTPUT_NAME "${lib_name_decorated}")
|
|
||||||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake
|
|
||||||
VERSION ${PROJECT_VERSION}
|
|
||||||
COMPATIBILITY AnyNewerVersion )
|
|
||||||
add_library(${oldlib_name} ALIAS ${lib_name})
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
jkqtplotter_installlibrary_new(${lib_name} ${libBaseName} ${CMAKE_CURRENT_LIST_DIR})
|
||||||
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir} "Shared")
|
|
||||||
endif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir} "")
|
|
||||||
endif(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
|
|
||||||
install(FILES ${HEADERS}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
|
|
||||||
COMPONENT Headers)
|
|
||||||
|
|
||||||
configure_file(${PROJECT_SOURCE_DIR}/readme.txt.in ${CMAKE_CURRENT_BINARY_DIR}/${libBasename}_Readme.txt @ONLY)
|
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libBasename}_Readme.txt" DESTINATION doc/JKQtPlotter )
|
|
||||||
install(FILES "${PROJECT_SOURCE_DIR}/LICENSE" DESTINATION doc/JKQtPlotter RENAME "${libBasename}_LICENSE.txt" )
|
|
||||||
|
|
||||||
|
@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
# package requires Qt 5/6
|
# package requires Qt 5/6
|
||||||
find_package(Qt@QT_VERSION_MAJOR@ COMPONENTS Core REQUIRED)
|
find_package(Qt@QT_VERSION_MAJOR@ COMPONENTS Core REQUIRED)
|
||||||
|
find_package(JKQTCommon@jkqtplotter_LIBNAME_VERSION_PART@ REQUIRED PATHS ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
# include auto-generated targets.cmake file
|
# include auto-generated targets.cmake file
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/@JKQTP_CURRENT_TARGET_FILENAME@")
|
include("${CMAKE_CURRENT_LIST_DIR}/@JKQTP_CURRENT_TARGET_FILENAME@")
|
@ -1,214 +1,40 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
set(libBasename JKQTMathText)
|
set(libBaseName JKQTMathText)
|
||||||
set(libIncludeSubdir jkqtmathtext)
|
set(lib_name ${libBaseName}${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
message( STATUS "-- Building ${lib_name}" )
|
||||||
set(libsh_name ${libBasename}SharedLib)
|
|
||||||
set(libsh_name_decorated ${libsh_name}${JKQtPlotter_LIBNAME_ADDITION})
|
|
||||||
set(${libBasename}_SHARED_LIBRARY ${libsh_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE)
|
|
||||||
message( STATUS "-- Building ${libsh_name}" )
|
|
||||||
endif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
# create the library (SHARED/STATIC is controlled by the CMake option BUILD_SHARED_LIBS
|
||||||
set(lib_name ${libBasename}Lib)
|
jkqtplotter_add_library(${lib_name} )
|
||||||
set(lib_name_decorated ${lib_name}${JKQtPlotter_LIBNAME_ADDITION})
|
|
||||||
set(${libBasename}_STATIC_LIBRARY ${lib_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE)
|
|
||||||
message( STATUS "-- Building ${lib_name}" )
|
|
||||||
endif(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
|
|
||||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
# set all default library options
|
||||||
|
jkqtplotter_setDefaultLibOptions(${lib_name} ${libBaseName} "${CMAKE_CURRENT_LIST_DIR}/private/jkqtmathtext_precomp.h")
|
||||||
|
|
||||||
# Set up source files
|
# DEPENDENCIES: Qt
|
||||||
set(SOURCES
|
target_link_libraries(${lib_name} PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets)
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtmathtext.cpp
|
target_link_libraries(${lib_name} PUBLIC ${jkqtplotter_namespace}JKQTCommon${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtmathtexttools.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtmathtextlabel.cpp
|
# add source files
|
||||||
|
target_sources(${lib_name} PRIVATE
|
||||||
|
jkqtmathtext.cpp
|
||||||
|
jkqtmathtexttools.cpp
|
||||||
|
jkqtmathtextlabel.cpp
|
||||||
|
)
|
||||||
|
# ... and add headers
|
||||||
|
target_sources(${lib_name} PUBLIC FILE_SET HEADERS TYPE HEADERS
|
||||||
|
FILES
|
||||||
|
jkqtmathtext.h
|
||||||
|
jkqtmathtexttools.h
|
||||||
|
jkqtmathtextlabel.h
|
||||||
|
jkqtmathtext_imexport.h
|
||||||
)
|
)
|
||||||
|
|
||||||
set(HEADERS
|
add_subdirectory(nodes)
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtmathtext.h>
|
add_subdirectory(parsers)
|
||||||
$<INSTALL_INTERFACE:jkqtmathtext.h>
|
add_subdirectory(resources)
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtmathtexttools.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtmathtexttools.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtmathtextlabel.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtmathtextlabel.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtmathtext_imexport.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtmathtext_imexport.h>
|
|
||||||
)
|
|
||||||
|
|
||||||
set(SOURCES_NODES
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextnode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtexttextnode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextbracenode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextdecoratednode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextfracnode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextinstructionnode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextboxinstructionnode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextmodifyenvironmentnode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextverticallistnode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtexthorizontallistnode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextmatrixnode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextsqrtnode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextsubsupernode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextsymbolnode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextnodetools.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextwhitespacenode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextnoopnode.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextverbatimnode.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(HEADERS_NODES
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextnode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextnode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtexttextnode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtexttextnode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextboxinstructionnode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextboxinstructionnode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextmodifyenvironmentnode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextmodifyenvironmentnode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextbracenode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextbracenode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextdecoratednode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextdecoratednode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextfracnode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextfracnode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextinstructionnode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextinstructionnode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextlistnode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextlistnode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextverticallistnode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextverticallistnode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtexthorizontallistnode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtexthorizontallistnode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextmatrixnode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextmatrixnode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextsqrtnode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextsqrtnode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextsubsupernode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextsubsupernode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextsymbolnode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextsymbolnode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextnodetools.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextnodetools.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextwhitespacenode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextwhitespacenode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextnoopnode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextnoopnode.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/nodes/jkqtmathtextverbatimnode.h>
|
|
||||||
$<INSTALL_INTERFACE:nodes/jkqtmathtextverbatimnode.h>
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
set(SOURCES_PARSERS
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/parsers/jkqtmathtextparser.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/parsers/jkqtmathtextlatexparser.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
set(HEADERS_PARSERS
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/parsers/jkqtmathtextparser.h>
|
|
||||||
$<INSTALL_INTERFACE:parsers/jkqtmathtextparser.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/parsers/jkqtmathtextlatexparser.h>
|
|
||||||
$<INSTALL_INTERFACE:parsers/jkqtmathtextlatexparser.h>
|
|
||||||
)
|
|
||||||
|
|
||||||
set(RESOURCES "")
|
|
||||||
if(JKQtPlotter_BUILD_INCLUDE_XITS_FONTS)
|
|
||||||
list(APPEND RESOURCES ${CMAKE_CURRENT_LIST_DIR}/resources/xits.qrc )
|
|
||||||
endif(JKQtPlotter_BUILD_INCLUDE_XITS_FONTS)
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS)
|
|
||||||
list(APPEND RESOURCES ${CMAKE_CURRENT_LIST_DIR}/resources/firamath.qrc )
|
|
||||||
endif(JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS)
|
|
||||||
|
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
|
||||||
|
|
||||||
function(JKQtMathText_setDefaultLibOptions TARGETNAME)
|
|
||||||
set_property(TARGET ${TARGETNAME} PROPERTY VERSION "${PROJECT_VERSION}")
|
|
||||||
target_link_libraries(${TARGETNAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets)
|
|
||||||
set_property(TARGET ${TARGETNAME} PROPERTY CXX_STANDARD ${JKQtPlotter_QT_CXX_STANDARD})
|
|
||||||
set_property(TARGET ${TARGETNAME} PROPERTY CXX_STANDARD_REQUIRED ${JKQtPlotter_QT_CXX_STANDARD_REQUIRED})
|
|
||||||
target_compile_features(${TARGETNAME} PUBLIC ${JKQtPlotter_QT_CXX_COMPILE_FEATURE})
|
|
||||||
if(MINGW)
|
|
||||||
# COMPILER-SETTINGS FOR MINGW
|
|
||||||
target_compile_options(${TARGETNAME} PUBLIC -fexceptions)
|
|
||||||
elseif(MSVC)
|
|
||||||
# COMPILER-SETTINGS FOR MS VISUAL C++
|
|
||||||
target_compile_options(${TARGETNAME} PUBLIC /EHsc)
|
|
||||||
target_compile_definitions(${TARGETNAME} PUBLIC NOMINMAX)
|
|
||||||
endif()
|
|
||||||
target_include_directories(${TARGETNAME} PUBLIC
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/../>
|
|
||||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
|
||||||
)
|
|
||||||
if(JKQtPlotter_BUILD_INCLUDE_XITS_FONTS)
|
|
||||||
target_compile_definitions(${TARGETNAME} PRIVATE JKQTMATHTEXT_COMPILED_WITH_XITS)
|
|
||||||
endif(JKQtPlotter_BUILD_INCLUDE_XITS_FONTS)
|
|
||||||
if(JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS)
|
|
||||||
target_compile_definitions(${TARGETNAME} PRIVATE JKQTMATHTEXT_COMPILED_WITH_FIRAMATH)
|
|
||||||
endif(JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS)
|
|
||||||
if(JKQtPlotter_BUILD_WITH_TIMING_INFO_OUTPUT)
|
|
||||||
target_compile_definitions(${TARGETNAME} PRIVATE JKQTBP_AUTOTIMER)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
|
||||||
target_precompile_headers(${TARGETNAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/private/jkqtmathtext_precomp.h)
|
|
||||||
target_sources(${TARGETNAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/private/jkqtmathtext_precomp.h)
|
|
||||||
endif(JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
add_library(${libsh_name} SHARED ${SOURCES} ${RESOURCES} ${HEADERS} ${SOURCES_NODES} ${HEADERS_NODES} ${SOURCES_PARSERS} ${HEADERS_PARSERS})
|
|
||||||
JKQtMathText_setDefaultLibOptions(${libsh_name})
|
|
||||||
set_property(TARGET ${libsh_name} PROPERTY OUTPUT_NAME "${libsh_name_decorated}")
|
|
||||||
target_link_libraries(${libsh_name} PUBLIC JKQTCommonSharedLib)
|
|
||||||
target_compile_definitions(${libsh_name} PUBLIC JKQTMATHTEXT_LIB_IN_DLL)
|
|
||||||
target_compile_definitions(${libsh_name} PRIVATE JKQTMATHTEXT_LIB_EXPORT_LIBRARY)
|
|
||||||
set_target_properties(${libsh_name} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS "ON")
|
|
||||||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Version.cmake
|
|
||||||
VERSION ${PROJECT_VERSION}
|
|
||||||
COMPATIBILITY AnyNewerVersion )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
add_library(${lib_name} STATIC ${SOURCES} ${RESOURCES} ${HEADERS} ${SOURCES_NODES} ${HEADERS_NODES} ${SOURCES_PARSERS} ${HEADERS_PARSERS})
|
|
||||||
JKQtMathText_setDefaultLibOptions(${lib_name})
|
|
||||||
set_property(TARGET ${lib_name} PROPERTY OUTPUT_NAME "${lib_name_decorated}")
|
|
||||||
|
|
||||||
target_link_libraries(${lib_name} PUBLIC JKQTCommonLib)
|
|
||||||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake
|
|
||||||
VERSION ${PROJECT_VERSION}
|
|
||||||
COMPATIBILITY AnyNewerVersion )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
jkqtplotter_installlibrary_new(${lib_name} ${libBaseName} ${CMAKE_CURRENT_LIST_DIR})
|
||||||
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir} "Shared")
|
|
||||||
endif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir} "")
|
|
||||||
endif(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
|
|
||||||
install(FILES ${HEADERS}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
|
|
||||||
COMPONENT Headers)
|
|
||||||
install(FILES ${HEADERS_NODES}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}/nodes
|
|
||||||
COMPONENT Headers)
|
|
||||||
install(FILES ${SOURCES_PARSERS}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}/parsers
|
|
||||||
COMPONENT Headers)
|
|
||||||
|
|
||||||
configure_file(${PROJECT_SOURCE_DIR}/readme.txt.in ${CMAKE_CURRENT_BINARY_DIR}/${libBasename}_Readme.txt @ONLY)
|
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libBasename}_Readme.txt" DESTINATION doc/JKQtPlotter )
|
|
||||||
install(FILES "${PROJECT_SOURCE_DIR}/LICENSE" DESTINATION doc/JKQtPlotter RENAME "${libBasename}_LICENSE.txt" )
|
|
||||||
install(FILES "${PROJECT_SOURCE_DIR}/lib/jkqtmathtext/resources/xits/OFL.txt" DESTINATION doc/JKQtPlotter RENAME "${libBasename}_XITS_LICENSE.txt" )
|
|
||||||
install(FILES "${PROJECT_SOURCE_DIR}/lib/jkqtmathtext/resources/xits/README.md" DESTINATION doc/JKQtPlotter RENAME "${libBasename}_XITS_README.md" )
|
|
||||||
install(FILES "${PROJECT_SOURCE_DIR}/lib/jkqtmathtext/resources/firaMath/LICENSE" DESTINATION doc/JKQtPlotter RENAME "${libBasename}_FIRAMATH_LICENSE" )
|
|
||||||
install(FILES "${PROJECT_SOURCE_DIR}/lib/jkqtmathtext/resources/firaMath/README.md" DESTINATION doc/JKQtPlotter RENAME "${libBasename}_FIRAMATH_README.md" )
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
# package requires Qt 5/6
|
# package requires Qt 5/6
|
||||||
find_package(Qt@QT_VERSION_MAJOR@ COMPONENTS Core Gui Widgets REQUIRED)
|
find_package(Qt@QT_VERSION_MAJOR@ COMPONENTS Core Gui Widgets REQUIRED)
|
||||||
|
|
||||||
find_package(JKQTCommon@JKQTP_CURRENT_TARGET_SHAREDPART@Lib REQUIRED PATHS ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
|
find_package(JKQTCommon@jkqtplotter_LIBNAME_VERSION_PART@ REQUIRED PATHS ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
# include auto-generated targets.cmake file
|
# include auto-generated targets.cmake file
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/@JKQTP_CURRENT_TARGET_FILENAME@")
|
include("${CMAKE_CURRENT_LIST_DIR}/@JKQTP_CURRENT_TARGET_FILENAME@")
|
46
lib/jkqtmathtext/nodes/CMakeLists.txt
Normal file
46
lib/jkqtmathtext/nodes/CMakeLists.txt
Normal file
@ -0,0 +1,46 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
|
# add source files
|
||||||
|
target_sources(${lib_name} PRIVATE
|
||||||
|
jkqtmathtextnode.cpp
|
||||||
|
jkqtmathtexttextnode.cpp
|
||||||
|
jkqtmathtextbracenode.cpp
|
||||||
|
jkqtmathtextdecoratednode.cpp
|
||||||
|
jkqtmathtextfracnode.cpp
|
||||||
|
jkqtmathtextinstructionnode.cpp
|
||||||
|
jkqtmathtextboxinstructionnode.cpp
|
||||||
|
jkqtmathtextmodifyenvironmentnode.cpp
|
||||||
|
jkqtmathtextverticallistnode.cpp
|
||||||
|
jkqtmathtexthorizontallistnode.cpp
|
||||||
|
jkqtmathtextmatrixnode.cpp
|
||||||
|
jkqtmathtextsqrtnode.cpp
|
||||||
|
jkqtmathtextsubsupernode.cpp
|
||||||
|
jkqtmathtextsymbolnode.cpp
|
||||||
|
jkqtmathtextnodetools.cpp
|
||||||
|
jkqtmathtextwhitespacenode.cpp
|
||||||
|
jkqtmathtextnoopnode.cpp
|
||||||
|
jkqtmathtextverbatimnode.cpp
|
||||||
|
)
|
||||||
|
# ... and add headers
|
||||||
|
target_sources(${lib_name} PUBLIC FILE_SET HEADERS TYPE HEADERS
|
||||||
|
FILES
|
||||||
|
jkqtmathtextnode.h
|
||||||
|
jkqtmathtexttextnode.h
|
||||||
|
jkqtmathtextboxinstructionnode.h
|
||||||
|
jkqtmathtextmodifyenvironmentnode.h
|
||||||
|
jkqtmathtextbracenode.h
|
||||||
|
jkqtmathtextdecoratednode.h
|
||||||
|
jkqtmathtextfracnode.h
|
||||||
|
jkqtmathtextinstructionnode.h
|
||||||
|
jkqtmathtextlistnode.h
|
||||||
|
jkqtmathtextverticallistnode.h
|
||||||
|
jkqtmathtexthorizontallistnode.h
|
||||||
|
jkqtmathtextmatrixnode.h
|
||||||
|
jkqtmathtextsqrtnode.h
|
||||||
|
jkqtmathtextsubsupernode.h
|
||||||
|
jkqtmathtextsymbolnode.h
|
||||||
|
jkqtmathtextnodetools.h
|
||||||
|
jkqtmathtextwhitespacenode.h
|
||||||
|
jkqtmathtextnoopnode.h
|
||||||
|
jkqtmathtextverbatimnode.h
|
||||||
|
)
|
13
lib/jkqtmathtext/parsers/CMakeLists.txt
Normal file
13
lib/jkqtmathtext/parsers/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
|
# add source files
|
||||||
|
target_sources(${lib_name} PRIVATE
|
||||||
|
jkqtmathtextparser.cpp
|
||||||
|
jkqtmathtextlatexparser.cpp
|
||||||
|
)
|
||||||
|
# ... and add headers
|
||||||
|
target_sources(${lib_name} PUBLIC FILE_SET HEADERS TYPE HEADERS
|
||||||
|
FILES
|
||||||
|
jkqtmathtextparser.h
|
||||||
|
jkqtmathtextlatexparser.h
|
||||||
|
)
|
24
lib/jkqtmathtext/resources/CMakeLists.txt
Normal file
24
lib/jkqtmathtext/resources/CMakeLists.txt
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
|
|
||||||
|
# add XITS as aressource
|
||||||
|
if(JKQtPlotter_BUILD_INCLUDE_XITS_FONTS)
|
||||||
|
target_sources(${lib_name} PRIVATE
|
||||||
|
xits.qrc
|
||||||
|
)
|
||||||
|
target_compile_definitions(${lib_name} PUBLIC JKQTMATHTEXT_COMPILED_WITH_XITS)
|
||||||
|
install(FILES "${CMAKE_CURRENT_LIST_DIR}/xits/OFL.txt" DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME "${lib_name}_XITS_LICENSE.txt" )
|
||||||
|
install(FILES "${CMAKE_CURRENT_LIST_DIR}/xits/README.md" DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME "${lib_name}_XITS_README.md" )
|
||||||
|
endif(JKQtPlotter_BUILD_INCLUDE_XITS_FONTS)
|
||||||
|
|
||||||
|
|
||||||
|
# add FIRAMATH as aressource
|
||||||
|
if(JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS)
|
||||||
|
target_sources(${lib_name} PRIVATE
|
||||||
|
firamath.qrc
|
||||||
|
)
|
||||||
|
target_compile_definitions(${lib_name} PUBLIC JKQTMATHTEXT_COMPILED_WITH_FIRAMATH)
|
||||||
|
install(FILES "${CMAKE_CURRENT_LIST_DIR}/firaMath/LICENSE" DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME "${lib_name}_FIRAMATH_LICENSE" )
|
||||||
|
install(FILES "${CMAKE_CURRENT_LIST_DIR}/firaMath/README.md" DESTINATION ${CMAKE_INSTALL_DOCDIR} RENAME "${lib_name}_FIRAMATH_README.md" )
|
||||||
|
endif(JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS)
|
||||||
|
|
@ -1,302 +1,80 @@
|
|||||||
cmake_minimum_required(VERSION 3.16)
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
set(libBasename JKQTPlotter)
|
set(libBaseName JKQTPlotter)
|
||||||
set(libIncludeSubdir jkqtplotter)
|
set(lib_name ${libBaseName}${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
message( STATUS "-- Building ${lib_name}" )
|
||||||
set(libsh_name ${libBasename}SharedLib)
|
|
||||||
set(libsh_name_decorated ${libsh_name}${JKQtPlotter_LIBNAME_ADDITION})
|
|
||||||
set(${libBasename}_SHARED_LIBRARY ${libsh_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE)
|
|
||||||
message( STATUS "-- Building ${libsh_name}" )
|
|
||||||
endif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
# create the library (SHARED/STATIC is controlled by the CMake option BUILD_SHARED_LIBS
|
||||||
set(lib_name ${libBasename}Lib)
|
jkqtplotter_add_library(${lib_name} )
|
||||||
set(lib_name_decorated ${lib_name}${JKQtPlotter_LIBNAME_ADDITION})
|
|
||||||
set(${libBasename}_STATIC_LIBRARY ${lib_name_decorated} CACHE STRING "name of static library for ${libBasename}" FORCE)
|
|
||||||
message( STATUS "-- Building ${lib_name}" )
|
|
||||||
endif(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
|
|
||||||
set(CMAKE_WINDOWS_EXPORT_ALL_SYMBOLS ON)
|
# set all default library options
|
||||||
|
jkqtplotter_setDefaultLibOptions(${lib_name} ${libBaseName} "${CMAKE_CURRENT_LIST_DIR}/private/jkqtplotter_precomp.h")
|
||||||
|
|
||||||
# Set up source files
|
# DEPENDENCIES: Qt
|
||||||
set(SOURCES_BASE
|
target_link_libraries(${lib_name} PUBLIC ${jkqtplotter_namespace}JKQTCommon${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtptools.cpp
|
target_link_libraries(${lib_name} PUBLIC ${jkqtplotter_namespace}JKQTMath${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpbaseelements.cpp
|
target_link_libraries(${lib_name} PUBLIC ${jkqtplotter_namespace}JKQTMathText${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpbaseplotter.cpp
|
target_link_libraries(${lib_name} PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::Xml)
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpdatastorage.cpp
|
if(JKQtPlotter_HAS_NO_PRINTER_SUPPORT)
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpgraphsbase.cpp
|
target_compile_definitions(${lib_name} PUBLIC JKQTPLOTTER_HAS_NO_PRINTSUPPORT)
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpgraphsbaseerrors.cpp
|
else()
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpgraphsbasestylingmixins.cpp
|
target_link_libraries(${lib_name} PUBLIC Qt${QT_VERSION_MAJOR}::PrintSupport)
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtplotter.cpp
|
target_compile_definitions(${lib_name} PUBLIC JKQTPLOTTER_HAS_PRINTSUPPORT)
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtplotterstyle.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpkeystyle.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpkey.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpbaseplotterstyle.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpcoordinateaxes.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpcoordinateaxesstyle.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpimagetools.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/jkqtpgraphsbasestyle.cpp
|
|
||||||
)
|
|
||||||
set(SOURCES_GRAPHS
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpscatter.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtprange.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpspecialline.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpbarchartbase.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpbarchart.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpboxplot.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpboxplotbase.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpboxplotstylingmixins.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpevaluatedfunctionbase.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpevaluatedfunction.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpfilledcurve.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpgeometric.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpgeoannotations.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpgeobase.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpgeolines.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpgeoshapes.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpimage.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpimpulses.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpparsedfunction.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtppeakstream.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpsinglecolumnsymbols.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpimageoverlays.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpcontour.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpimagergb.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpviolinplot.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpviolinplotstylingmixins.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpstatisticsadaptors.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpevaluatedparametriccurve.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtplines.cpp
|
|
||||||
)
|
|
||||||
set(SOURCES_GUI
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/gui/jkqtpcomboboxes.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/gui/jkqtpenhancedspinboxes.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/gui/jkqtpenhancedtableview.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/gui/jkqtpgraphsmodel.cpp
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/gui/jkvanishqtoolbar.cpp
|
|
||||||
)
|
|
||||||
|
|
||||||
|
|
||||||
set(HEADERS_BASE
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtptools.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtptools.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpbaseelements.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpbaseelements.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpbaseplotter.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpbaseplotter.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpdatastorage.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpdatastorage.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpgraphsbase.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpgraphsbase.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpgraphsbaseerrors.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpgraphsbaseerrors.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpgraphsbasestylingmixins.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpgraphsbasestylingmixins.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtplotter.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtplotter.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtplotterstyle.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtplotterstyle.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpkeystyle.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpkeystyle.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpkey.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpkey.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpbaseplotterstyle.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpbaseplotterstyle.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpcoordinateaxes.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpcoordinateaxes.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpcoordinateaxesstyle.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpcoordinateaxesstyle.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpimagetools.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpimagetools.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtpgraphsbasestyle.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtpgraphsbasestyle.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtplotter_configmacros.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtplotter_configmacros.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/jkqtplotter_imexport.h>
|
|
||||||
$<INSTALL_INTERFACE:jkqtplotter_imexport.h>
|
|
||||||
)
|
|
||||||
set(HEADERS_GRAPHS
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpboxplot.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpboxplot.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpboxplotbase.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpboxplotbase.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpboxplotstylingmixins.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpboxplotstylingmixins.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpevaluatedfunctionbase.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpevaluatedfunctionbase.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpevaluatedfunction.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpevaluatedfunction.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpfilledcurve.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpfilledcurve.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpgeometric.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpgeometric.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpgeoannotations.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpgeoannotations.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpgeobase.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpgeobase.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpgeolines.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpgeolines.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpgeoshapes.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpgeoshapes.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpimage.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpimage.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpimpulses.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpimpulses.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpparsedfunction.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpparsedfunction.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtppeakstream.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtppeakstream.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpsinglecolumnsymbols.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpsinglecolumnsymbols.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpimageoverlays.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpimageoverlays.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpcontour.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpcontour.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpimagergb.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpimagergb.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpviolinplot.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpviolinplot.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpviolinplotstylingmixins.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpviolinplotstylingmixins.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpstatisticsadaptors.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpstatisticsadaptors.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpscatter.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpscatter.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtprange.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtprange.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpspecialline.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpspecialline.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpbarchartbase.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpbarchartbase.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpbarchart.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpbarchart.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtpevaluatedparametriccurve.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtpevaluatedparametriccurve.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/graphs/jkqtplines.h>
|
|
||||||
$<INSTALL_INTERFACE:graphs/jkqtplines.h>
|
|
||||||
)
|
|
||||||
set(HEADERS_GUI
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/gui/jkqtpcomboboxes.h>
|
|
||||||
$<INSTALL_INTERFACE:gui/jkqtpcomboboxes.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/gui/jkqtpenhancedspinboxes.h>
|
|
||||||
$<INSTALL_INTERFACE:gui/jkqtpenhancedspinboxes.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/gui/jkqtpenhancedtableview.h>
|
|
||||||
$<INSTALL_INTERFACE:gui/jkqtpenhancedtableview.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/gui/jkqtpgraphsmodel.h>
|
|
||||||
$<INSTALL_INTERFACE:gui/jkqtpgraphsmodel.h>
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/gui/jkvanishqtoolbar.h>
|
|
||||||
$<INSTALL_INTERFACE:gui/jkvanishqtoolbar.h>
|
|
||||||
)
|
|
||||||
|
|
||||||
set(RESOURCES
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/resources/jkqtpbaseplotter.qrc
|
|
||||||
${CMAKE_CURRENT_LIST_DIR}/resources/jkqtpstyles.qrc
|
|
||||||
)
|
|
||||||
|
|
||||||
include(CMakePackageConfigHelpers)
|
|
||||||
|
|
||||||
function(JKQtPlottter_setDefaultLibOptions TARGETNAME)
|
|
||||||
set_property(TARGET ${TARGETNAME} PROPERTY VERSION "${PROJECT_VERSION}")
|
|
||||||
target_link_libraries(${TARGETNAME} PUBLIC Qt${QT_VERSION_MAJOR}::Core Qt${QT_VERSION_MAJOR}::Gui Qt${QT_VERSION_MAJOR}::Widgets Qt${QT_VERSION_MAJOR}::Svg Qt${QT_VERSION_MAJOR}::Xml)
|
|
||||||
if(JKQtPlotter_HAS_NO_PRINTER_SUPPORT)
|
|
||||||
target_compile_definitions(${TARGETNAME} PUBLIC JKQTPLOTTER_HAS_NO_PRINTSUPPORT)
|
|
||||||
else()
|
|
||||||
target_link_libraries(${TARGETNAME} PUBLIC Qt${QT_VERSION_MAJOR}::PrintSupport)
|
|
||||||
target_compile_definitions(${TARGETNAME} PUBLIC JKQTPLOTTER_HAS_PRINTSUPPORT)
|
|
||||||
endif()
|
|
||||||
set_property(TARGET ${TARGETNAME} PROPERTY CXX_STANDARD ${JKQtPlotter_QT_CXX_STANDARD})
|
|
||||||
set_property(TARGET ${TARGETNAME} PROPERTY CXX_STANDARD_REQUIRED ${JKQtPlotter_QT_CXX_STANDARD_REQUIRED})
|
|
||||||
target_compile_features(${TARGETNAME} PUBLIC ${JKQtPlotter_QT_CXX_COMPILE_FEATURE})
|
|
||||||
if(JKQtPlotter_BUILD_WITH_TIMING_INFO_OUTPUT)
|
|
||||||
target_compile_definitions(${TARGETNAME} PRIVATE JKQTBP_AUTOTIMER)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
if(MINGW)
|
|
||||||
# COMPILER-SETTINGS FOR MINGW
|
|
||||||
target_compile_options(${TARGETNAME} PUBLIC -fexceptions)
|
|
||||||
elseif(MSVC)
|
|
||||||
# COMPILER-SETTINGS FOR MS VISUAL C++
|
|
||||||
target_compile_options(${TARGETNAME} PUBLIC /EHsc)
|
|
||||||
target_compile_definitions(${TARGETNAME} PUBLIC NOMINMAX)
|
|
||||||
endif()
|
|
||||||
target_include_directories(${TARGETNAME} PUBLIC
|
|
||||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR}/../>
|
|
||||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
|
||||||
)
|
|
||||||
target_include_directories(${TARGETNAME} PUBLIC
|
|
||||||
$<BUILD_INTERFACE:${JKQTPLOTTER_VERSION_FILE_DIR}>
|
|
||||||
$<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR}>
|
|
||||||
)
|
|
||||||
|
|
||||||
# precomiled headers to speed up compilation
|
|
||||||
if (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
|
||||||
target_precompile_headers(${TARGETNAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/private/jkqtplotter_precomp.h)
|
|
||||||
target_sources(${TARGETNAME} PRIVATE ${CMAKE_CURRENT_LIST_DIR}/private/jkqtplotter_precomp.h)
|
|
||||||
endif (JKQtPlotter_BUILD_WITH_PRECOMPILED_HEADERS)
|
|
||||||
|
|
||||||
endfunction()
|
|
||||||
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
add_library(${libsh_name} SHARED
|
|
||||||
${SOURCES_BASE}
|
|
||||||
${SOURCES_GRAPHS}
|
|
||||||
${SOURCES_GUI}
|
|
||||||
${RESOURCES}
|
|
||||||
${HEADERS_BASE}
|
|
||||||
${HEADERS_GRAPHS}
|
|
||||||
${HEADERS_GUI}
|
|
||||||
)
|
|
||||||
JKQtPlottter_setDefaultLibOptions(${libsh_name})
|
|
||||||
set_property(TARGET ${libsh_name} PROPERTY OUTPUT_NAME "${libsh_name_decorated}")
|
|
||||||
target_link_libraries(${libsh_name} PUBLIC JKQTCommonSharedLib JKQTMathSharedLib JKQTMathTextSharedLib)
|
|
||||||
target_compile_definitions(${libsh_name} PUBLIC JKQTPLOTTER_LIB_IN_DLL)
|
|
||||||
target_compile_definitions(${libsh_name} PRIVATE JKQTPLOTTER_LIB_EXPORT_LIBRARY)
|
|
||||||
set_target_properties(${libsh_name} PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS "ON")
|
|
||||||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${libsh_name}Version.cmake
|
|
||||||
VERSION ${PROJECT_VERSION}
|
|
||||||
COMPATIBILITY AnyNewerVersion )
|
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
add_library(${lib_name} STATIC ${SOURCES_BASE} ${SOURCES_GRAPHS} ${SOURCES_GUI} ${RESOURCES} ${HEADERS_BASE} ${HEADERS_GRAPHS} ${HEADERS_GUI})
|
|
||||||
JKQtPlottter_setDefaultLibOptions(${lib_name})
|
|
||||||
set_property(TARGET ${lib_name} PROPERTY OUTPUT_NAME "${lib_name_decorated}")
|
|
||||||
target_link_libraries(${lib_name} PUBLIC JKQTCommonLib JKQTMathLib JKQTMathTextLib)
|
|
||||||
write_basic_package_version_file(${CMAKE_CURRENT_BINARY_DIR}/${lib_name}Version.cmake
|
|
||||||
VERSION ${PROJECT_VERSION}
|
|
||||||
COMPATIBILITY AnyNewerVersion )
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
# add source files
|
||||||
|
target_sources(${lib_name} PRIVATE
|
||||||
|
jkqtptools.cpp
|
||||||
|
jkqtpbaseelements.cpp
|
||||||
|
jkqtpbaseplotter.cpp
|
||||||
|
jkqtpdatastorage.cpp
|
||||||
|
jkqtpgraphsbase.cpp
|
||||||
|
jkqtpgraphsbaseerrors.cpp
|
||||||
|
jkqtpgraphsbasestylingmixins.cpp
|
||||||
|
jkqtplotter.cpp
|
||||||
|
jkqtplotterstyle.cpp
|
||||||
|
jkqtpkeystyle.cpp
|
||||||
|
jkqtpkey.cpp
|
||||||
|
jkqtpbaseplotterstyle.cpp
|
||||||
|
jkqtpcoordinateaxes.cpp
|
||||||
|
jkqtpcoordinateaxesstyle.cpp
|
||||||
|
jkqtpimagetools.cpp
|
||||||
|
jkqtpgraphsbasestyle.cpp
|
||||||
|
)
|
||||||
|
# ... and add headers
|
||||||
|
target_sources(${lib_name} PUBLIC FILE_SET HEADERS TYPE HEADERS
|
||||||
|
FILES
|
||||||
|
jkqtptools.h
|
||||||
|
jkqtpbaseelements.h
|
||||||
|
jkqtpbaseplotter.h
|
||||||
|
jkqtpdatastorage.h
|
||||||
|
jkqtpgraphsbase.h
|
||||||
|
jkqtpgraphsbaseerrors.h
|
||||||
|
jkqtpgraphsbasestylingmixins.h
|
||||||
|
jkqtplotter.h
|
||||||
|
jkqtplotterstyle.h
|
||||||
|
jkqtpkeystyle.h
|
||||||
|
jkqtpkey.h
|
||||||
|
jkqtpbaseplotterstyle.h
|
||||||
|
jkqtpcoordinateaxes.h
|
||||||
|
jkqtpcoordinateaxesstyle.h
|
||||||
|
jkqtpimagetools.h
|
||||||
|
jkqtpgraphsbasestyle.h
|
||||||
|
jkqtplotter_configmacros.h
|
||||||
|
jkqtplotter_imexport.h
|
||||||
|
)
|
||||||
|
|
||||||
|
add_subdirectory(graphs)
|
||||||
|
add_subdirectory(gui)
|
||||||
|
add_subdirectory(resources)
|
||||||
|
|
||||||
|
# add version info
|
||||||
|
target_include_directories(${lib_name} PRIVATE ${JKQTPLOTTER_VERSION_FILE_DIR})
|
||||||
|
|
||||||
|
|
||||||
# Installation
|
# Installation
|
||||||
if(JKQtPlotter_BUILD_SHARED_LIBS)
|
jkqtplotter_installlibrary_new(${lib_name} ${libBaseName} ${CMAKE_CURRENT_LIST_DIR})
|
||||||
jkqtplotter_installlibrary(${libsh_name} ${libIncludeSubdir} "Shared")
|
|
||||||
endif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
|
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
jkqtplotter_installlibrary(${lib_name} ${libIncludeSubdir} "")
|
|
||||||
endif(JKQtPlotter_BUILD_STATIC_LIBS)
|
|
||||||
|
|
||||||
install(FILES ${HEADERS_BASE}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}
|
|
||||||
COMPONENT Headers)
|
|
||||||
|
|
||||||
install(FILES ${HEADERS_GRAPHS}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}/graphs
|
|
||||||
COMPONENT Headers)
|
|
||||||
|
|
||||||
install(FILES ${HEADERS_GUI}
|
|
||||||
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir}/gui
|
|
||||||
COMPONENT Headers)
|
|
||||||
|
|
||||||
install(FILES ${JKQTPLOTTER_VERSION_FILE} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${libIncludeSubdir} COMPONENT Headers )
|
|
||||||
configure_file(${PROJECT_SOURCE_DIR}/readme.txt.in ${CMAKE_CURRENT_BINARY_DIR}/${libBasename}_Readme.txt @ONLY)
|
|
||||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${libBasename}_Readme.txt" DESTINATION doc/JKQtPlotter )
|
|
||||||
install(FILES "${PROJECT_SOURCE_DIR}/LICENSE" DESTINATION doc/JKQtPlotter RENAME "${libBasename}_LICENSE.txt" )
|
|
||||||
|
|
||||||
|
|
||||||
#get_target_property(printsupp_inc Qt${QT_VERSION_MAJOR}::PrintSupport INTERFACE_INCLUDE_DIRECTORIES)
|
|
||||||
#message("Qt${QT_VERSION_MAJOR}::PrintSupport::INTERFACE_INCLUDE_DIRECTORIES = ${printsupp_inc}")
|
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
|
|
||||||
# package requires Qt @QT_VERSION_MAJOR@
|
# package requires Qt @QT_VERSION_MAJOR@
|
||||||
find_package(Qt@QT_VERSION_MAJOR@ COMPONENTS Core Gui Widgets Svg Xml OpenGL @JKQTPLOTTER_PRINTSUPPORT_LIBSTRING@ REQUIRED)
|
find_package(Qt@QT_VERSION_MAJOR@ COMPONENTS Core Gui Widgets Svg Xml OpenGL @JKQTPLOTTER_PRINTSUPPORT_LIBSTRING@ REQUIRED)
|
||||||
find_package(JKQTCommon@JKQTP_CURRENT_TARGET_SHAREDPART@Lib REQUIRED PATHS ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
|
find_package(JKQTCommon@jkqtplotter_LIBNAME_VERSION_PART@ REQUIRED PATHS ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
|
||||||
find_package(JKQTMath@JKQTP_CURRENT_TARGET_SHAREDPART@Lib REQUIRED PATHS ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
|
find_package(JKQTMath@jkqtplotter_LIBNAME_VERSION_PART@ REQUIRED PATHS ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
|
||||||
find_package(JKQTMathText@JKQTP_CURRENT_TARGET_SHAREDPART@Lib REQUIRED PATHS ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
|
find_package(JKQTMathText@jkqtplotter_LIBNAME_VERSION_PART@ REQUIRED PATHS ${CMAKE_CURRENT_LIST_DIR} ${CMAKE_MODULE_PATH})
|
||||||
|
|
||||||
# include auto-generated targets.cmake file
|
# include auto-generated targets.cmake file
|
||||||
include("${CMAKE_CURRENT_LIST_DIR}/@JKQTP_CURRENT_TARGET_FILENAME@")
|
include("${CMAKE_CURRENT_LIST_DIR}/@JKQTP_CURRENT_TARGET_FILENAME@")
|
67
lib/jkqtplotter/graphs/CMakeLists.txt
Normal file
67
lib/jkqtplotter/graphs/CMakeLists.txt
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
|
# add source files
|
||||||
|
target_sources(${lib_name} PRIVATE
|
||||||
|
jkqtpscatter.cpp
|
||||||
|
jkqtprange.cpp
|
||||||
|
jkqtpspecialline.cpp
|
||||||
|
jkqtpbarchartbase.cpp
|
||||||
|
jkqtpbarchart.cpp
|
||||||
|
jkqtpboxplot.cpp
|
||||||
|
jkqtpboxplotbase.cpp
|
||||||
|
jkqtpboxplotstylingmixins.cpp
|
||||||
|
jkqtpevaluatedfunctionbase.cpp
|
||||||
|
jkqtpevaluatedfunction.cpp
|
||||||
|
jkqtpfilledcurve.cpp
|
||||||
|
jkqtpgeometric.cpp
|
||||||
|
jkqtpgeoannotations.cpp
|
||||||
|
jkqtpgeobase.cpp
|
||||||
|
jkqtpgeolines.cpp
|
||||||
|
jkqtpgeoshapes.cpp
|
||||||
|
jkqtpimage.cpp
|
||||||
|
jkqtpimpulses.cpp
|
||||||
|
jkqtpparsedfunction.cpp
|
||||||
|
jkqtppeakstream.cpp
|
||||||
|
jkqtpsinglecolumnsymbols.cpp
|
||||||
|
jkqtpimageoverlays.cpp
|
||||||
|
jkqtpcontour.cpp
|
||||||
|
jkqtpimagergb.cpp
|
||||||
|
jkqtpviolinplot.cpp
|
||||||
|
jkqtpviolinplotstylingmixins.cpp
|
||||||
|
jkqtpstatisticsadaptors.cpp
|
||||||
|
jkqtpevaluatedparametriccurve.cpp
|
||||||
|
jkqtplines.cpp
|
||||||
|
)
|
||||||
|
# ... and add headers
|
||||||
|
target_sources(${lib_name} PUBLIC FILE_SET HEADERS TYPE HEADERS
|
||||||
|
FILES
|
||||||
|
jkqtpboxplot.h
|
||||||
|
jkqtpboxplotbase.h
|
||||||
|
jkqtpboxplotstylingmixins.h
|
||||||
|
jkqtpevaluatedfunctionbase.h
|
||||||
|
jkqtpevaluatedfunction.h
|
||||||
|
jkqtpfilledcurve.h
|
||||||
|
jkqtpgeometric.h
|
||||||
|
jkqtpgeoannotations.h
|
||||||
|
jkqtpgeobase.h
|
||||||
|
jkqtpgeolines.h
|
||||||
|
jkqtpgeoshapes.h
|
||||||
|
jkqtpimage.h
|
||||||
|
jkqtpimpulses.h
|
||||||
|
jkqtpparsedfunction.h
|
||||||
|
jkqtppeakstream.h
|
||||||
|
jkqtpsinglecolumnsymbols.h
|
||||||
|
jkqtpimageoverlays.h
|
||||||
|
jkqtpcontour.h
|
||||||
|
jkqtpimagergb.h
|
||||||
|
jkqtpviolinplot.h
|
||||||
|
jkqtpviolinplotstylingmixins.h
|
||||||
|
jkqtpstatisticsadaptors.h
|
||||||
|
jkqtpscatter.h
|
||||||
|
jkqtprange.h
|
||||||
|
jkqtpspecialline.h
|
||||||
|
jkqtpbarchartbase.h
|
||||||
|
jkqtpbarchart.h
|
||||||
|
jkqtpevaluatedparametriccurve.h
|
||||||
|
jkqtplines.h
|
||||||
|
)
|
19
lib/jkqtplotter/gui/CMakeLists.txt
Normal file
19
lib/jkqtplotter/gui/CMakeLists.txt
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
|
# add source files
|
||||||
|
target_sources(${lib_name} PRIVATE
|
||||||
|
jkqtpcomboboxes.cpp
|
||||||
|
jkqtpenhancedspinboxes.cpp
|
||||||
|
jkqtpenhancedtableview.cpp
|
||||||
|
jkqtpgraphsmodel.cpp
|
||||||
|
jkvanishqtoolbar.cpp
|
||||||
|
)
|
||||||
|
# ... and add headers
|
||||||
|
target_sources(${lib_name} PUBLIC FILE_SET HEADERS TYPE HEADERS
|
||||||
|
FILES
|
||||||
|
jkqtpcomboboxes.h
|
||||||
|
jkqtpenhancedspinboxes.h
|
||||||
|
jkqtpenhancedtableview.h
|
||||||
|
jkqtpgraphsmodel.h
|
||||||
|
jkvanishqtoolbar.h
|
||||||
|
)
|
8
lib/jkqtplotter/resources/CMakeLists.txt
Normal file
8
lib/jkqtplotter/resources/CMakeLists.txt
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
cmake_minimum_required(VERSION 3.23)
|
||||||
|
|
||||||
|
|
||||||
|
# add aressource
|
||||||
|
target_sources(${lib_name} PRIVATE
|
||||||
|
jkqtpbaseplotter.qrc
|
||||||
|
jkqtpstyles.qrc
|
||||||
|
)
|
@ -1,6 +1,6 @@
|
|||||||
=============================================================================
|
=============================================================================
|
||||||
== JKQTPlotters is a library for scientific plotting using Qt5/6 ==
|
== JKQTPlotters is a library for scientific plotting using Qt5/6 ==
|
||||||
== sub-library: @libBasename@
|
== sub-library: @lib_name@
|
||||||
=============================================================================
|
=============================================================================
|
||||||
|
|
||||||
Library Information:
|
Library Information:
|
||||||
@ -14,7 +14,11 @@ Library Information:
|
|||||||
Build information:
|
Build information:
|
||||||
used compiler: @CMAKE_CXX_COMPILER_ID@ @CMAKE_CXX_COMPILER_VERSION@
|
used compiler: @CMAKE_CXX_COMPILER_ID@ @CMAKE_CXX_COMPILER_VERSION@
|
||||||
used Qt version: @QT_VERSION@
|
used Qt version: @QT_VERSION@
|
||||||
built static libs: @BUILD_STATIC_LIBS@
|
|
||||||
built shared libs: @BUILD_SHARED_LIBS@
|
built shared libs: @BUILD_SHARED_LIBS@
|
||||||
built examples: @BUILD_EXAMPLES@
|
witho print support: @JKQtPlotter_BUILD_WITH_PRINTER_SUPPORT@
|
||||||
included XITS fonts: @BUILD_INCLUDE_XITS_FONTS@
|
C++20 support: @JKQtPlotter_ENABLED_CXX20@
|
||||||
|
timing debug output: @JKQtPlotter_BUILD_WITH_TIMING_INFO_OUTPUT@
|
||||||
|
built tools: @JKQtPlotter_BUILD_TOOLS@
|
||||||
|
included XITS fonts: @JKQtPlotter_BUILD_INCLUDE_XITS_FONTS@
|
||||||
|
included FIRA fonts: @JKQtPlotter_BUILD_INCLUDE_FIRAMATH_FONTS@
|
||||||
|
built examples: @JKQtPlotter_BUILD_EXAMPLES@
|
||||||
|
@ -16,11 +16,7 @@ set(UIS )
|
|||||||
|
|
||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
target_include_directories(${EXENAME} PRIVATE ../../lib)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTMathText${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTMathTextLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTMathTextSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -18,11 +18,8 @@ set(UIS )
|
|||||||
|
|
||||||
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
|
||||||
target_include_directories(${EXENAME} PRIVATE ../../lib ${CMAKE_CURRENT_LIST_DIR}/../../examples/styling/)
|
target_include_directories(${EXENAME} PRIVATE ../../lib ${CMAKE_CURRENT_LIST_DIR}/../../examples/styling/)
|
||||||
if(JKQtPlotter_BUILD_STATIC_LIBS)
|
target_link_libraries(${EXENAME} ${jkqtplotter_namespace}JKQTPlotter${jkqtplotter_LIBNAME_VERSION_PART})
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterLib)
|
|
||||||
elseif(JKQtPlotter_BUILD_SHARED_LIBS)
|
|
||||||
target_link_libraries(${EXENAME} JKQTPlotterSharedLib)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user