Skip to content

Commit

Permalink
Merge pull request #280 from itom-project/v4.3.0_ITOM_Version
Browse files Browse the repository at this point in the history
V4.3.0 itom version
  • Loading branch information
BBertschinger committed Jun 2, 2024
2 parents 0014759 + 9f2f646 commit 7a18b1e
Show file tree
Hide file tree
Showing 45 changed files with 1,234 additions and 792 deletions.
49 changes: 27 additions & 22 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,22 @@
# along with itom. If not, see <http://www.gnu.org/licenses/>.

cmake_minimum_required(VERSION 3.12...3.29)
project(itom)

message(
STATUS "------------------- PROJECT itom ---------------------")
# Retrieve Version Number and Identifier from GIT-TAG
include(cmake/VersionFromGit.cmake)
version_from_git(
LOG ON
TIMESTAMP "%Y%m%d%H%M%S"
)

# define cmake project and version number
project(itom VERSION ${GIT_VERSION})
set(itom_VERSION_IDENTIFIERS ${GIT_IDENTIFIERS})

message(
STATUS "------------------- Version = ${itom_VERSION} -----------------------\n")

# set qitom as Visual Studio Startup-Projekt
set_property( DIRECTORY PROPERTY VS_STARTUP_PROJECT "qitom" )
Expand Down Expand Up @@ -109,15 +124,6 @@ if(SETUP_ISSCONFIG)
set(InnoSetupPath CACHE PATH "base path to inno setup")
endif()

#find current itom version from qitom/global.h
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/Qitom/global.h ITOM_versionStringFull LIMIT_COUNT 1 REGEX "^#define ITOM_VERSION_STR.*$")
string(REGEX MATCH "([0-9]+).([0-9]+).([0-9]+)" ITOM_versionString ${ITOM_versionStringFull}) #searches for Number.Number.Number[.Number] in ITOM_versionStringFull

message(STATUS "itom version is: ${ITOM_versionString}. If wrong change it in global.h and reconfigure CMake")
message(STATUS "")
message(STATUS "CMAKE_CURRENT_BINARY_DIR: ${CMAKE_CURRENT_BINARY_DIR}")
message(STATUS "")

################################################################################################################
#CONFIGURE AND PREPARE THE INNO SETUP FILES (require location of Qt, therefore find_package_qt must be called)

Expand Down Expand Up @@ -149,16 +155,16 @@ itom_find_package_qt(ON Core)
itom_define_sdk_platform()
itom_define_sdk_compiler()

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup/win32/itom_setup_win32.iss.in
${CMAKE_CURRENT_BINARY_DIR}/setup/win32/itom_setup_win32.iss )
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup/common/itom_setup_code.iss.in
${CMAKE_CURRENT_BINARY_DIR}/setup/win32/itom_setup_win32_code.iss )
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup/common/start_qt_deployment.bat.in
${CMAKE_CURRENT_BINARY_DIR}/setup/win32/start_qt_deployment.bat )
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup/common/PythonRequirements/requirementsMandatory.txt
${CMAKE_CURRENT_BINARY_DIR}/setup/win32/PythonRequirements/requirementsMandatory.txt)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup/common/PythonRequirements/requirementsOptional.txt
${CMAKE_CURRENT_BINARY_DIR}/setup/win32/PythonRequirements/requirementsOptional.txt)
find_package(OpenCV QUIET)
string(REPLACE . "" OpenCV_LIB_VERSION ${OpenCV_VERSION})

find_package(VTK QUIET)
string(REGEX MATCH "([0-9]+\.[0-9]+)" VTK_LIB_VERSION ${VTK_VERSION})

find_package(Python QUIET)
string(REGEX MATCH "([0-9]+\.[0-9]+)" Python_LIB_VERSION ${Python_VERSION})
string(REPLACE . "" Python_LIB_VERSION ${Python_LIB_VERSION})

configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup/win64/itom_setup_win64.iss.in
${CMAKE_CURRENT_BINARY_DIR}/setup/win64/itom_setup_win64.iss )
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup/common/itom_setup_code.iss.in
Expand All @@ -175,8 +181,6 @@ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup/win64/itom_setup_zipper/start_q
${CMAKE_CURRENT_BINARY_DIR}/setup/win64/itom_setup_zipper/start_qt_deployment.bat.in COPYONLY)

if(SETUP_ISSCONFIG)
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup/win32/compile_iss_win32.bat.in
${CMAKE_CURRENT_BINARY_DIR}/setup/win32/compile_iss_win32.bat )
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/setup/win64/compile_iss_win64.bat.in
${CMAKE_CURRENT_BINARY_DIR}/setup/win64/compile_iss_win64.bat )
endif()
Expand Down Expand Up @@ -256,6 +260,7 @@ file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/cmake DESTINATION
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/cmake/ItomBuildMacros.cmake DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/SDK/cmake)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Setup_PCL_Itom.cmake DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/SDK/cmake)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/cmake/Setup_PCL_Plugins.cmake DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/SDK/cmake)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/cmake/VersionFromGit.cmake DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/SDK/cmake)

if(MSVC)
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/designerPluginLibraryVersion.rc DESTINATION ${CMAKE_CURRENT_BINARY_DIR}/SDK)
Expand Down
2 changes: 1 addition & 1 deletion COPYING.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
itom measurement system
URL: http://www.uni-stuttgart.de/ito
Copyright (C) 2022, Institut für Technische Optik (ITO),
Universität Stuttgart, Germany
University Stuttgart, Germany

itom is free software and is provided under the terms of the
GNU LIBRARY GENERAL PUBLIC LICENSE (LGPL).
Expand Down
3 changes: 1 addition & 2 deletions QPropertyEditor/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ add_definitions(-DQPROPERTYEDITOR_DLL -D_QPROPERTYEDITOR_DLL)
include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${ITOM_SDK_INCLUDE_DIRS}
)
)


set(qpropertyeditor_HEADERS
Expand Down
26 changes: 14 additions & 12 deletions Qitom/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,14 @@ if(BUILD_WITH_PYMATLAB)
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\R2019b;MATLABROOT]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\R2020a;MATLABROOT]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\R2020b;MATLABROOT]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\R2021a;MATLABROOT]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\R2021b;MATLABROOT]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\R2022a;MATLABROOT]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\R2022b;MATLABROOT]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\R2023a;MATLABROOT]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\R2023b;MATLABROOT]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\R2024a;MATLABROOT]"
"[HKEY_LOCAL_MACHINE\\SOFTWARE\\MathWorks\\MATLAB\\R2024b;MATLABROOT]"
)

if(BUILD_TARGET64)
Expand Down Expand Up @@ -211,6 +219,7 @@ endforeach()

include_directories(
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_BINARY_DIR}/..
${CMAKE_CURRENT_BINARY_DIR}/python
${CMAKE_CURRENT_BINARY_DIR}/GeneratedFiles
${CMAKE_CURRENT_SOURCE_DIR}
Expand All @@ -233,6 +242,7 @@ include_directories(
../PointCloud/
../AddInManager/
../itomWidgets
${CMAKE_CURRENT_BINARY_DIR}/../SDK/include
)

link_directories(
Expand Down Expand Up @@ -261,10 +271,10 @@ set(qitom_HEADERS_NOMOC
)

set(qitom_HEADERS
${CMAKE_CURRENT_BINARY_DIR}/global.h
${CMAKE_CURRENT_SOURCE_DIR}/../AddInManager/0.h # this file must be first in list for automoc
${CMAKE_CURRENT_SOURCE_DIR}/main.h
${CMAKE_CURRENT_SOURCE_DIR}/AppManagement.h
${CMAKE_CURRENT_SOURCE_DIR}/global.h
${CMAKE_CURRENT_SOURCE_DIR}/mainApplication.h
${CMAKE_CURRENT_SOURCE_DIR}/api/apiFunctionsGraph.h
${CMAKE_CURRENT_SOURCE_DIR}/delegates/htmlItemDelegate.h
Expand Down Expand Up @@ -735,15 +745,8 @@ itom_add_source_group(textdiff)
#end add filters to visual studio


#Find ITOM_VERION version by looking at global.h
file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/global.h ITOM_VERSIONS_TMP REGEX "^#define ITOM_VERSION_[A-Z]+[ \t]+0x[0-9A-F]+$")
string(REGEX REPLACE ".*#define ITOM_VERSION_MAJOR[ \t]+(0x[0-9A-F]+).*" "\\1" ITOM_VERSION_MAJOR ${ITOM_VERSIONS_TMP})
string(REGEX REPLACE ".*#define ITOM_VERSION_MINOR[ \t]+(0x[0-9A-F]+).*" "\\1" ITOM_VERSION_MINOR ${ITOM_VERSIONS_TMP})
string(REGEX REPLACE ".*#define ITOM_VERSION_PATCH[ \t]+(0x[0-9A-F]+).*" "\\1" ITOM_VERSION_PATCH ${ITOM_VERSIONS_TMP})
#set(ITOM_VERSION_STRING ${ITOM_VERSION_MAJOR}.${ITOM_VERSION_MINOR}.${ITOM_VERSION_PATCH} CACHE STRING "" FORCE)

file(STRINGS ${CMAKE_CURRENT_SOURCE_DIR}/global.h ITOM_VERSIONS_TMP REGEX "^#define ITOM_VERSION_STR[ \t]+.*$")
string(REGEX REPLACE ".*#define ITOM_VERSION_STR[ \t]+.([0-9\\.]+).*" "\\1" ITOM_VERSION_STRING ${ITOM_VERSIONS_TMP})
#Define Version in global.h
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/global.h.in ${CMAKE_CURRENT_BINARY_DIR}/global.h)

if(APPLE)
# Set meta data for OS X bundle
Expand Down Expand Up @@ -806,7 +809,7 @@ endif(APPLE)
unset(GIT_FOUND CACHE)
find_package(Git)

if(CONSIDER_GIT_SVN AND GIT_FOUND)
if(CONSIDER_GIT_SVN AND GIT_FOUND AND GIT_REPO_FOUND)
message(STATUS "Using GIT as repository information")
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/pyGit2Header.py.in ${CMAKE_CURRENT_BINARY_DIR}/pyGit2Header.py )

Expand Down Expand Up @@ -1049,7 +1052,6 @@ endif()
if(MSVC)
message(STATUS "Using rc-File for version information under windows")
configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc )

endif()

# Copying scripts for OS X build process
Expand Down
2 changes: 1 addition & 1 deletion Qitom/COPYING.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
itom measurement system
URL: http://www.uni-stuttgart.de/ito
Copyright (C) 2020, Institut für Technische Optik (ITO),
Universität Stuttgart, Germany
University Stuttgart, Germany

itom is free software and is provided under the terms of the
GNU LIBRARY GENERAL PUBLIC LICENSE (LGPL).
Expand Down
12 changes: 7 additions & 5 deletions Qitom/global.h → Qitom/global.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@
#include <qsharedpointer.h>

/* definition and macros */
#define ITOM_VERSION_MAJOR 0x04
#define ITOM_VERSION_MINOR 0x02
#define ITOM_VERSION_PATCH 0x02
#define ITOM_VERSION CREATEVERSION(ITOM_VERSION_MAJOR,ITOM_VERSION_MINOR,ITOM_VERSION_PATCH) //ITOM_VERSION is (major << 16) + (minor << 8) + patch
#define ITOM_VERSION_STR "4.2.2"
#define ITOM_VERSION_MAJOR ${itom_VERSION_MAJOR}
#define ITOM_VERSION_MINOR ${itom_VERSION_MINOR}
#define ITOM_VERSION_PATCH ${itom_VERSION_PATCH}
#define ITOM_VERSION_IDENTIFIERS "${itom_VERSION_IDENTIFIERS}"
#define ITOM_VERSION CREATEVERSION(ITOM_VERSION_MAJOR ,ITOM_VERSION_MINOR,ITOM_VERSION_PATCH) //ITOM_VERSION is (major << 16) + (minor << 8) + patch
#define ITOM_VERSION_STR "${itom_VERSION}"
#define ITOM_RELEASE_STR "${itom_VERSION}"

#ifdef USEPCL
#define ITOM_POINTCLOUDLIBRARY 1
Expand Down
Binary file added Qitom/icons/itomicon/splashScreen4dev.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7a18b1e

Please sign in to comment.