FIXing and EXTENDing jkqtplotter_version.h

This commit is contained in:
jkriege2 2024-01-05 21:01:46 +01:00
parent 76be6e4824
commit 11b9ac6c8b
4 changed files with 14 additions and 5 deletions

View File

@ -14,7 +14,8 @@ set(UIS )
add_executable(${EXENAME} WIN32 ${SOURCES} ${HEADERS} ${RESOURCES} ${UIS})
target_link_libraries(${EXENAME} JKQTPExampleToolsLib)
target_include_directories(${EXENAME} PRIVATE ../../lib)
target_include_directories(${EXENAME} PRIVATE ${CMAKE_CURRENT_BINARY_DIR}/../../lib)
if(JKQtPlotter_BUILD_STATIC_LIBS)
target_link_libraries(${EXENAME} JKQTPlotterLib)

View File

@ -44,9 +44,10 @@ message( STATUS ".. BUILDING LIBRARIES" )
message( STATUS "............................................................................." )
set(JKQTPLOTTER_VERSION_FILE_DIR ${CMAKE_CURRENT_BINARY_DIR})
set(JKQTPLOTTER_VERSION_FILE ${JKQTPLOTTER_VERSION_FILE_DIR}/jkqtplotter_version.h)
configure_file(${CMAKE_CURRENT_LIST_DIR}/jkqtplotter_version.h.in
${CMAKE_CURRENT_BINARY_DIR}/jkqtplotter_version.h)
${JKQTPLOTTER_VERSION_FILE})
include_directories(.)

View File

@ -221,6 +221,10 @@ function(JKQtPlottter_setDefaultLibOptions TARGETNAME)
$<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)
@ -285,6 +289,7 @@ 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" )

View File

@ -1,5 +1,5 @@
/*
Copyright (c) 2008-2022 Jan W. Krieger (<jan@jkrieger.de>)
Copyright (c) 2008-2024 Jan W. Krieger (<jan@jkrieger.de>)
@ -24,6 +24,8 @@ namespace JKQTPLOTTER_VERSION {
const char* PROJECT_LONGNAME = "@PROJECT_LONGNAME@";
const char* PROJECT_VERSION = "@PROJECT_VERSION@";
const char* PROJECT_BITNESS = "@PROJECT_BITNESS@";
const char* PROJECT_BUILDTYPE = "@CMAKE_BUILD_TYPE@";
const char* PROJECT_COMPILED_AGAINST_QT_VERSION = "@QT_VERSION@";
}
#JKQTPLOTTER_VERSION_DEFINES_H
#endif // JKQTPLOTTER_VERSION_DEFINES_H