From 504b66c923a82a16ce4f3f0f587ee8e0b288635b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Thu, 24 Sep 2020 12:40:44 +0200 Subject: [PATCH 01/21] Added unittest to check for the space bool bug --- src/Unittests/unittests_read_write_OM.cc | 58 ++++++++++++++++++++++++ 1 file changed, 58 insertions(+) diff --git a/src/Unittests/unittests_read_write_OM.cc b/src/Unittests/unittests_read_write_OM.cc index 35e4522d..2c437537 100644 --- a/src/Unittests/unittests_read_write_OM.cc +++ b/src/Unittests/unittests_read_write_OM.cc @@ -1509,4 +1509,62 @@ TEST_F(OpenMeshReadWriteOM, WriteAndLoadDoubles) { EXPECT_EQ(mesh.normal(OpenMesh::FaceHandle(0)), mesh2.normal(OpenMesh::FaceHandle(0))); } + + +/* + * Try to write and load bool property + */ +TEST_F(OpenMeshReadWriteOM, WriteAndLoadBoolCheckSpaces) { + + typedef OpenMesh::PolyMesh_ArrayKernelT DoublePolyMesh; + + DoublePolyMesh mesh; + + OpenMesh::VPropHandleT prop; + mesh.add_property(prop,"VBProp"); + mesh.property(prop).set_persistent(true); + + + // Generate a bool property which will be packed into a space character + + std::vector vertices; + for (unsigned int i = 0; i < 8; ++i) + { + vertices.push_back(mesh.add_vertex(DoublePolyMesh::Point(0.0, 0.0, 0.0))); + + if ( i == 5) + mesh.property(prop,vertices[i]) = true; + else + mesh.property(prop,vertices[i]) = false; + } + + std::string file_name = "bool-space-test.om"; + + OpenMesh::IO::Options opt = OpenMesh::IO::Options::Default; + ASSERT_TRUE(OpenMesh::IO::write_mesh(mesh, file_name, opt)) << "Could not write file " << file_name; + + + // ==================================================== + // Now read it back + // ==================================================== + + DoublePolyMesh mesh2; + OpenMesh::VPropHandleT prop2; + mesh2.add_property(prop2,"VBProp"); + mesh2.property(prop2).set_persistent(true); + + ASSERT_TRUE(OpenMesh::IO::read_mesh(mesh2, file_name, opt)) << "Could not read file " << file_name; + + // Check if the property is still ok + for (unsigned int i = 0; i < 8; ++i) + { + if ( i == 5) + EXPECT_TRUE( mesh.property(prop,mesh2.vertex_handle((i)) ) ); + else + EXPECT_FALSE(mesh.property(prop,mesh2.vertex_handle((i)))); + } +} + + + } From 87038b1bc40b70c1e0df9c99e6e4aa9099cddb80 Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Wed, 2 Dec 2020 10:40:41 +0100 Subject: [PATCH 02/21] add cmake-library submodule --- .gitmodules | 3 +++ cmake-library | 1 + 2 files changed, 4 insertions(+) create mode 100644 .gitmodules create mode 160000 cmake-library diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..6681eef9 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "cmake-library"] + path = cmake-library + url = ../../cmake/cmake-library diff --git a/cmake-library b/cmake-library new file mode 160000 index 00000000..9c4e20e2 --- /dev/null +++ b/cmake-library @@ -0,0 +1 @@ +Subproject commit 9c4e20e20c8cac5dcb82fd92efd8de0f4d517252 From 06c0032c3677e483b66472733d61bc4599dc78c2 Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Wed, 2 Dec 2020 10:45:44 +0100 Subject: [PATCH 03/21] remove ACG cmake files and use files in cmake-library instead --- CMakeLists.txt | 2 +- cmake/ACGCommon.cmake | 307 ---------------------------------------- cmake/ACGCompiler.cmake | 203 -------------------------- cmake/ACGDoxygen.cmake | 123 ---------------- cmake/ACGOutput.cmake | 49 ------- cmake/ACGQt.cmake | 105 -------------- 6 files changed, 1 insertion(+), 788 deletions(-) delete mode 100644 cmake/ACGCommon.cmake delete mode 100644 cmake/ACGCompiler.cmake delete mode 100644 cmake/ACGDoxygen.cmake delete mode 100644 cmake/ACGOutput.cmake delete mode 100644 cmake/ACGQt.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index d5f0d3b9..55ce9d83 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -37,7 +37,7 @@ if (NOT WIN32 AND NOT CMAKE_BUILD_TYPE) endif() # add our macro directory to cmake search path -set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/cmake) +set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_CURRENT_SOURCE_DIR}/cmake-library/finders ${CMAKE_CURRENT_SOURCE_DIR}/cmake-library/VCI ) set (CMAKE_DEBUG_POSTFIX "d") # include our cmake files diff --git a/cmake/ACGCommon.cmake b/cmake/ACGCommon.cmake deleted file mode 100644 index 65a38530..00000000 --- a/cmake/ACGCommon.cmake +++ /dev/null @@ -1,307 +0,0 @@ -if (EXISTS ${CMAKE_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.cmake) - include (${CMAKE_SOURCE_DIR}/${CMAKE_PROJECT_NAME}.cmake) -endif () - -# prevent build in source directory - if ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") - message (SEND_ERROR "Building in the source directory is not supported.") - message (FATAL_ERROR "Please remove the created \"CMakeCache.txt\" file, the \"CMakeFiles\" directory and create a build directory and call \"${CMAKE_COMMAND} \".") - endif ("${CMAKE_BINARY_DIR}" STREQUAL "${CMAKE_SOURCE_DIR}") - -# allow only Debug and Release builds -set (CMAKE_CONFIGURATION_TYPES "Debug;Release" CACHE STRING "") -mark_as_advanced (CMAKE_CONFIGURATION_TYPES) - -# set Debus as default build target -if (NOT CMAKE_BUILD_TYPE) - set (CMAKE_BUILD_TYPE Debug CACHE STRING - "Choose the type of build, options are: Debug, Release." - FORCE) -endif () - -# create our output directroy -if (NOT EXISTS ${CMAKE_BINARY_DIR}/Build) - file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build) -endif () - -# read version from file -macro (acg_get_version) - if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/${ARGN}/VERSION") - file (READ "${CMAKE_CURRENT_SOURCE_DIR}/${ARGN}/VERSION" _file) - else () - file (READ "${CMAKE_CURRENT_SOURCE_DIR}/VERSION" _file) - endif () - - string ( - REGEX REPLACE - "^.*ID=([^\n]*).*$" "\\1" - _id ${_file} - ) - string ( - REGEX REPLACE - "^.*VERSION=([^\n]*).*$" "\\1" - _version ${_file} - ) - string ( - REGEX REPLACE - "^.*MAJOR=([^\n]*).*$" "\\1" - _major ${_file} - ) - string ( - REGEX REPLACE - "^.*MINOR=([^\n]*).*$" "\\1" - _minor ${_file} - ) - string ( - REGEX REPLACE - "^.*PATCH=([^\n]*).*$" "\\1" - _patch ${_file} - ) - - set (${_id}_VERSION ${_version}) - set (${_id}_VERSION_MAJOR ${_major}) - set (${_id}_VERSION_MINOR ${_minor}) - set (${_id}_VERSION_PATCH ${_patch}) -endmacro () - - -# set directory structures for the different platforms -if (CMAKE_HOST_SYSTEM_NAME MATCHES Windows) - set (ACG_PROJECT_DATADIR ".") - set (ACG_PROJECT_LIBDIR "lib") - set (ACG_PROJECT_BINDIR ".") - set (ACG_PROJECT_PLUGINDIR "Plugins") - if (NOT EXISTS ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}) - file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}) - endif () -elseif (APPLE) - set (ACG_PROJECT_DATADIR "share/${CMAKE_PROJECT_NAME}") - set (ACG_PROJECT_LIBDIR "lib${LIB_SUFFIX}") - set (CMAKE_LIBRARY_OUTPUT_DIR "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}") - set (ACG_PROJECT_PLUGINDIR "${ACG_PROJECT_LIBDIR}/plugins") - set (ACG_PROJECT_BINDIR "bin") -else () - set (ACG_PROJECT_DATADIR "share/${CMAKE_PROJECT_NAME}") - set (ACG_PROJECT_LIBDIR "lib${LIB_SUFFIX}") - set (ACG_PROJECT_PLUGINDIR "${ACG_PROJECT_LIBDIR}/plugins") - set (ACG_PROJECT_BINDIR "bin") -endif () - -# allow a project to modify the directories -if (COMMAND acg_modify_project_dirs) - acg_modify_project_dirs () -endif () - -if (NOT EXISTS ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}) - file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}) -endif () - - -# sets default build properties -macro (acg_set_target_props target) - if (WIN32) - set_target_properties ( - ${target} PROPERTIES - BUILD_WITH_INSTALL_RPATH 1 - SKIP_BUILD_RPATH 0 - ) - elseif (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE) - # save rpath - set_target_properties ( - ${target} PROPERTIES - INSTALL_RPATH "@executable_path/../${ACG_PROJECT_LIBDIR}" - MACOSX_RPATH 1 - #BUILD_WITH_INSTALL_RPATH 1 - SKIP_BUILD_RPATH 0 - ) - elseif (NOT APPLE) - - set_target_properties ( - ${target} PROPERTIES - INSTALL_RPATH "$ORIGIN/../${ACG_PROJECT_LIBDIR}" - BUILD_WITH_INSTALL_RPATH 1 - SKIP_BUILD_RPATH 0 - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_BINDIR}" - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}" - ) - endif () -endmacro () - -include (AddFileDependencies) -include (ACGCompiler) - -# define INCLUDE_TEMPLATES for everything we build -add_definitions (-DINCLUDE_TEMPLATES) - -# unsets the given variable -macro (acg_unset var) - set (${var} "" CACHE INTERNAL "") -endmacro () - -# sets the given variable -macro (acg_set var value) - set (${var} ${value} CACHE INTERNAL "") -endmacro () - -# append all files with extension "ext" in the "dirs" directories to "ret" -# excludes all files starting with a '.' (dot) -macro (acg_append_files ret ext) - foreach (_dir ${ARGN}) - file (GLOB _files "${_dir}/${ext}") - foreach (_file ${_files}) - get_filename_component (_filename ${_file} NAME) - if (_filename MATCHES "^[.]") - list (REMOVE_ITEM _files ${_file}) - endif () - endforeach () - list (APPEND ${ret} ${_files}) - endforeach () -endmacro () - -# get all files in directory, but ignore svn -macro (acg_get_files_in_dir ret dir) - file (GLOB_RECURSE __files RELATIVE "${dir}" "${dir}/*") - foreach (_file ${__files}) - if ( (NOT _file MATCHES ".*svn.*") AND (NOT _file MATCHES ".DS_Store") ) - list (APPEND ${ret} "${_file}") - endif () - endforeach () -endmacro () - -# copy the whole directory without svn files -function (acg_copy_after_build target src dst) - acg_unset (_files) - acg_get_files_in_dir (_files ${src}) - foreach (_file ${_files}) - add_custom_command(TARGET ${target} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E copy_if_different "${src}/${_file}" "${dst}/${_file}" - ) - endforeach () -endfunction () - -# extended version of add_executable that also copies output to out Build directory -function (acg_add_executable _target) - add_executable (${_target} ${ARGN}) - - # set common target properties defined in common.cmake - acg_set_target_props (${_target}) - - if (WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)) - add_custom_command (TARGET ${_target} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E - copy_if_different - $ - ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_BINDIR}/$) - endif (WIN32 OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)) - - if (NOT ACG_PROJECT_MACOS_BUNDLE OR NOT APPLE) - install (TARGETS ${_target} DESTINATION ${ACG_PROJECT_BINDIR}) - endif () -endfunction () - -# extended version of add_library that also copies output to out Build directory -function (acg_add_library _target _libtype) - - if (${_libtype} STREQUAL SHAREDANDSTATIC) - set (_type SHARED) - if (NOT WIN32 OR MINGW) - set (_and_static 1) - else () - set (_and_static 0) - endif () - else () - set (_type ${_libtype}) - set (_and_static 0) - endif () - - add_library (${_target} ${_type} ${ARGN} ) - - # set common target properties defined in common.cmake - acg_set_target_props (${_target}) - - if (_and_static) - add_library (${_target}Static STATIC ${ARGN}) - - # set common target properties defined in common.cmake - acg_set_target_props (${_target}Static) - - set_target_properties(${_target}Static PROPERTIES OUTPUT_NAME ${_target}) - - if (NOT APPLE) - set_target_properties (${_target}Static PROPERTIES - LIBRARY_OUTPUT_DIRECTORY "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}" - ) - endif () - endif () - - if ( (WIN32 AND MSVC) OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)) - if (${_type} STREQUAL SHARED) - add_custom_command (TARGET ${_target} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E - copy_if_different - $ - ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/$) - add_custom_command (TARGET ${_target} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E - copy_if_different - $ - ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/$) - elseif (${_type} STREQUAL MODULE) - if (NOT EXISTS ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_PLUGINDIR}) - file (MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_PLUGINDIR}) - endif () - add_custom_command (TARGET ${_target} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E - copy_if_different - $ - ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_PLUGINDIR}/$) - elseif (${_type} STREQUAL STATIC) - add_custom_command (TARGET ${_target} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E - copy_if_different - $ - ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/$) - endif() - - - # make an extra copy for windows into the binary directory - if (${_type} STREQUAL SHARED AND WIN32) - add_custom_command (TARGET ${_target} POST_BUILD - COMMAND ${CMAKE_COMMAND} -E - copy_if_different - $ - ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_BINDIR}/$) - endif () - - endif( (WIN32 AND MSVC) OR (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)) - - if (_and_static) - add_custom_command (TARGET ${_target}Static POST_BUILD - COMMAND ${CMAKE_COMMAND} -E - copy_if_different - $ - ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_LIBDIR}/$) - - endif () - - - # Block installation of libraries by setting ACG_NO_LIBRARY_INSTALL - if ( NOT ACG_NO_LIBRARY_INSTALL ) - if (NOT ACG_PROJECT_MACOS_BUNDLE OR NOT APPLE) - if (${_type} STREQUAL SHARED OR ${_type} STREQUAL STATIC ) - install (TARGETS ${_target} - RUNTIME DESTINATION ${ACG_PROJECT_BINDIR} - LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR} - ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR}) - if (_and_static) - install (TARGETS ${_target}Static - DESTINATION ${ACG_PROJECT_LIBDIR}) - endif () - elseif (${_type} STREQUAL MODULE) - install (TARGETS ${_target} DESTINATION ${ACG_PROJECT_PLUGINDIR}) - endif () - endif () - endif() - -endfunction () - diff --git a/cmake/ACGCompiler.cmake b/cmake/ACGCompiler.cmake deleted file mode 100644 index 464d4f49..00000000 --- a/cmake/ACGCompiler.cmake +++ /dev/null @@ -1,203 +0,0 @@ -################################################################################ -# Custom settings for compiler flags and similar -################################################################################ - -if ( WIN32 ) - ################################################################################ - # Windows large memory support - ################################################################################ - if ( NOT DEFINED WINDOWS_LARGE_MEMORY_SUPPORT ) - set( WINDOWS_LARGE_MEMORY_SUPPORT true CACHE BOOL "Enable or disable binary support for large memory" ) - endif() - - set( ADDITIONAL_CMAKE_EXE_LINKER_FLAGS ) - set( ADDITIONAL_CMAKE_SHARED_LINKER_FLAGS ) - set( ADDITIONAL_CMAKE_MODULE_LINKER_FLAGS ) - - if ( WINDOWS_LARGE_MEMORY_SUPPORT ) - if (MSVC) - list(APPEND ADDITIONAL_CMAKE_EXE_LINKER_FLAGS "/LARGEADDRESSAWARE" ) - list(APPEND ADDITIONAL_CMAKE_SHARED_LINKER_FLAGS "/LARGEADDRESSAWARE" ) - list(APPEND ADDITIONAL_CMAKE_MODULE_LINKER_FLAGS "/LARGEADDRESSAWARE" ) - endif() - endif() - - - foreach( flag ${ADDITIONAL_CMAKE_EXE_LINKER_FLAGS} ) - if( NOT CMAKE_EXE_LINKER_FLAGS MATCHES "${flag}" ) - set( CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${flag} ") - endif() - endforeach() - - foreach( flag ${ADDITIONAL_CMAKE_SHARED_LINKER_FLAGS} ) - if( NOT CMAKE_SHARED_LINKER_FLAGS MATCHES "${flag}" ) - set( CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} ${flag} ") - endif() - endforeach() - - foreach( flag ${ADDITIONAL_CMAKE_MODULE_LINKER_FLAGS} ) - if( NOT CMAKE_MODULE_LINKER_FLAGS MATCHES "${flag}" ) - set( CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} ${flag} ") - endif() - endforeach() - -endif( WIN32 ) - -if (UNIX) - - set ( ADDITIONAL_CXX_FLAGS ) - set ( ADDITIONAL_CXX_DEBUG_FLAGS ) - set ( ADDITIONAL_CXX_RELEASE_FLAGS ) - set ( ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS ) - - set ( ADDITIONAL_C_FLAGS ) - set ( ADDITIONAL_C_DEBUG_FLAGS ) - set ( ADDITIONAL_C_RELEASE_FLAGS ) - set ( ADDITIONAL_C_RELWITHDEBINFO_FLAGS ) - - ################################################################################ - # Defaults - ################################################################################ - - # add our standard flags for Template inclusion - list(APPEND ADDITIONAL_CXX_FLAGS "-DINCLUDE_TEMPLATES" ) - list(APPEND ADDITIONAL_C_FLAGS "-DINCLUDE_TEMPLATES" ) - - ################################################################################ - # OS Defines - ################################################################################ - - if (APPLE) - add_definitions( -DARCH_DARWIN ) - endif() - - ################################################################################ - # Build/Release Defines - ################################################################################ - IF( NOT CMAKE_SYSTEM MATCHES "SunOS*") - list(APPEND ADDITIONAL_CXX_DEBUG_FLAGS "-DDEBUG" ) - list(APPEND ADDITIONAL_CXX_RELEASE_FLAGS "-DNDEBUG" ) - list(APPEND ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS "-DDEBUG" ) - - list(APPEND ADDITIONAL_C_DEBUG_FLAGS "-DDEBUG" ) - list(APPEND ADDITIONAL_C_RELEASE_FLAGS "-DNDEBUG" ) - list(APPEND ADDITIONAL_C_RELWITHDEBINFO_FLAGS "-DDEBUG" ) - ENDIF() - - ################################################################################ - # Warnings - ################################################################################ - - # Add the standard compiler warnings - if ( NOT COMPILER_WARNINGS ) - - IF ( APPLE ) - # Skip unused parameters as it has to be used for the documentation via doxygen and the interfaces - set ( COMPILER_WARNINGS "-W" "-Wall" "-Wno-unused" "-Wextra" "-Wno-non-virtual-dtor" "-Wno-unused-parameter" "-Wno-variadic-macros" CACHE STRINGLIST "This list contains the warning flags used during compilation " ) - elseif ("${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}" MATCHES ".*clang") - set ( COMPILER_WARNINGS "-W" "-Wall" "-Wextra" "-Wno-non-virtual-dtor" "-Wno-unused-parameter" "-Wno-variadic-macros" CACHE STRINGLIST "This list contains the warning flags used during compilation " ) - ELSEIF ( CMAKE_SYSTEM MATCHES "SunOS*" ) - set ( COMPILER_WARNINGS "" CACHE STRINGLIST "This list contains the warning flags used during compilation " ) - ELSE () - set ( COMPILER_WARNINGS "-W" "-Wall" "-Wno-unused" "-Wextra" "-Wno-variadic-macros" CACHE STRINGLIST "This list contains the warning flags used during compilation " ) - ENDIF() - - endif ( NOT COMPILER_WARNINGS ) - - list(APPEND ADDITIONAL_CXX_FLAGS ${COMPILER_WARNINGS} ) - list(APPEND ADDITIONAL_C_FLAGS ${COMPILER_WARNINGS} ) - - - if ("${CMAKE_CXX_COMPILER}" MATCHES "Clang") - list(APPEND ADDITIONAL_CXX_FLAGS "-Weverything") - list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-c++98-compat") - list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-c++98-compat-pedantic") - list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-padded") - list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-old-style-cast") - list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-documentation-unknown-command") - list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-unreachable-code-return") - # enable later: - list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-sign-conversion") - list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-deprecated") - list(APPEND ADDITIONAL_CXX_FLAGS "-Wno-weak-vtables") - endif() - - ################################################################################ - # STL Vector checks - ################################################################################ - - # Pre initialize stl vector check variable - if ( NOT STL_VECTOR_CHECKS ) - set ( STL_VECTOR_CHECKS false CACHE BOOL "Include full stl vector checks in debug mode (This option is only used in debug Mode!)" ) - endif ( NOT STL_VECTOR_CHECKS ) - - # Add a flag to check stl vectors - if ( STL_VECTOR_CHECKS AND NOT CMAKE_SYSTEM MATCHES "SunOS*" ) - list(APPEND ADDITIONAL_CXX_DEBUG_FLAGS "-D_GLIBCXX_DEBUG" ) - list(APPEND ADDITIONAL_CXX_DEBUG_FLAGS "-D_GLIBCXX_DEBUG_PEDANTIC") - list(APPEND ADDITIONAL_CXX_RELEASE_FLAGS "-D_GLIBCXX_DEBUG" ) - list(APPEND ADDITIONAL_CXX_RELEASE_FLAGS "-D_GLIBCXX_DEBUG_PEDANTIC") - list(APPEND ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS "-D_GLIBCXX_DEBUG" ) - list(APPEND ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS "-D_GLIBCXX_DEBUG_PEDANTIC") - - list(APPEND ADDITIONAL_C_DEBUG_FLAGS "-D_GLIBCXX_DEBUG" ) - list(APPEND ADDITIONAL_C_DEBUG_FLAGS "-D_GLIBCXX_DEBUG_PEDANTIC") - list(APPEND ADDITIONAL_C_RELEASE_FLAGS "-D_GLIBCXX_DEBUG" ) - list(APPEND ADDITIONAL_C_RELEASE_FLAGS "-D_GLIBCXX_DEBUG_PEDANTIC") - list(APPEND ADDITIONAL_C_RELWITHDEBINFO_FLAGS "-D_GLIBCXX_DEBUG" ) - list(APPEND ADDITIONAL_C_RELWITHDEBINFO_FLAGS "-D_GLIBCXX_DEBUG_PEDANTIC") - endif() - - ################################################################################ - # Process the additional flags: - ################################################################################ - - # Add the debug flags - foreach( flag ${ADDITIONAL_CXX_FLAGS} ${ADDITIONAL_CXX_DEBUG_FLAGS} ) - list (FIND ${CMAKE_CXX_FLAGS_DEBUG} ${flag} _index) - if (${_index} EQUAL -1) - set( CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${flag} ") - endif() - endforeach() - - # Add the release flags - foreach( flag ${ADDITIONAL_CXX_FLAGS} ${ADDITIONAL_CXX_RELEASE_FLAGS} ) - list (FIND ${CMAKE_CXX_FLAGS_RELEASE} ${flag} _index) - if (${_index} EQUAL -1) - set( CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${flag} ") - endif() - endforeach() - - # Add the release with debug info flags - foreach( flag ${ADDITIONAL_CXX_FLAGS} ${ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS} ) - list (FIND ${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${flag} _index) - if (${_index} EQUAL -1) - set( CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${flag} ") - endif() - endforeach() - - # Add the debug flags - foreach( flag ${ADDITIONAL_C_FLAGS} ${ADDITIONAL_C_DEBUG_FLAGS} ) - list (FIND ${CMAKE_C_FLAGS_DEBUG} ${flag} _index) - if (${_index} EQUAL -1) - set( CMAKE_C_FLAGS_DEBUG "${CMAKE_C_FLAGS_DEBUG} ${flag} ") - endif() - endforeach() - - # Add the release flags - foreach( flag ${ADDITIONAL_C_FLAGS} ${ADDITIONAL_C_RELEASE_FLAGS} ) - list (FIND ${CMAKE_C_FLAGS_RELEASE} ${flag} _index) - if (${_index} EQUAL -1) - set( CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} ${flag} ") - endif() - endforeach() - - # Add the release with debug info flags - foreach( flag ${ADDITIONAL_C_FLAGS} ${ADDITIONAL_C_RELWITHDEBINFO_FLAGS} ) - list (FIND ${CMAKE_C_FLAGS_RELWITHDEBINFO} ${flag} _index) - if (${_index} EQUAL -1) - set( CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELWITHDEBINFO} ${flag} ") - endif() - endforeach() - -endif () diff --git a/cmake/ACGDoxygen.cmake b/cmake/ACGDoxygen.cmake deleted file mode 100644 index bd6cc5f5..00000000 --- a/cmake/ACGDoxygen.cmake +++ /dev/null @@ -1,123 +0,0 @@ -# -helper macro to add a "doc" target with CMake build system. -# and configure doxy.config.in to doxy.config -# -# target "doc" allows building the documentation with doxygen/dot on WIN32 and Linux -# Creates .chm windows help file if MS HTML help workshop -# (available from http://msdn.microsoft.com/workshop/author/htmlhelp) -# is installed with its DLLs in PATH. -# -# -# Please note, that the tools, e.g.: -# doxygen, dot, latex, dvips, makeindex, gswin32, etc. -# must be in path. -# -# Note about Visual Studio Projects: -# MSVS hast its own path environment which may differ from the shell. -# See "Menu Tools/Options/Projects/VC++ Directories" in VS 7.1 -# -# author Jan Woetzel 2004-2006 -# www.mip.informatik.uni-kiel.de/~jw - -if ( NOT DOXYGEN_FOUND) - FIND_PACKAGE(Doxygen) -endif() - -IF (DOXYGEN_FOUND) - - # click+jump in Emacs and Visual Studio (for doxy.config) (jw) - IF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)") - SET(DOXY_WARN_FORMAT "\"$file($line) : $text \"") - ELSE (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)") - SET(DOXY_WARN_FORMAT "\"$file:$line: $text \"") - ENDIF (CMAKE_BUILD_TOOL MATCHES "(msdev|devenv)") - - # we need latex for doxygen because of the formulas - FIND_PACKAGE(LATEX) - IF (NOT LATEX_COMPILER) - MESSAGE(STATUS "latex command LATEX_COMPILER not found but usually required. You will probably get warnings and user inetraction on doxy run.") - ENDIF (NOT LATEX_COMPILER) - IF (NOT MAKEINDEX_COMPILER) - MESSAGE(STATUS "makeindex command MAKEINDEX_COMPILER not found but usually required.") - ENDIF (NOT MAKEINDEX_COMPILER) - IF (NOT DVIPS_CONVERTER) - MESSAGE(STATUS "dvips command DVIPS_CONVERTER not found but usually required.") - ENDIF (NOT DVIPS_CONVERTER) - - IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in") - MESSAGE(STATUS "configured ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in --> ${CMAKE_CURRENT_BINARY_DIR}/doxy.config") - CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in - ${CMAKE_CURRENT_BINARY_DIR}/doxy.config - @ONLY ) - # use (configured) doxy.config from (out of place) BUILD tree: - SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config") - ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in") - # use static hand-edited doxy.config from SOURCE tree: - SET(DOXY_CONFIG "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config") - IF (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config") - MESSAGE(STATUS "WARNING: using existing ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config instead of configuring from doxy.config.in file.") - ELSE (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config") - IF (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in") - # using template doxy.config.in - MESSAGE(STATUS "configured ${CMAKE_CMAKE_MODULE_PATH}/doxy.config.in --> ${CMAKE_CURRENT_BINARY_DIR}/doxy.config") - CONFIGURE_FILE(${CMAKE_MODULE_PATH}/doxy.config.in - ${CMAKE_CURRENT_BINARY_DIR}/doxy.config - @ONLY ) - SET(DOXY_CONFIG "${CMAKE_CURRENT_BINARY_DIR}/doxy.config") - ELSE (EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in") - # failed completely... - MESSAGE(SEND_ERROR "Please create ${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in (or doxy.config as fallback)") - ENDIF(EXISTS "${CMAKE_MODULE_PATH}/doxy.config.in") - - ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config") - ENDIF(EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/doxy.config.in") - - ADD_CUSTOM_TARGET(doc ${DOXYGEN_EXECUTABLE} ${DOXY_CONFIG}) - - # create a windows help .chm file using hhc.exe - # HTMLHelp DLL must be in path! - # fallback: use hhw.exe interactively - IF (WIN32) - FIND_PACKAGE(HTMLHelp) - IF (HTML_HELP_COMPILER) - SET (TMP "${CMAKE_CURRENT_BINARY_DIR}\\Doc\\html\\index.hhp") - STRING(REGEX REPLACE "[/]" "\\\\" HHP_FILE ${TMP} ) - # MESSAGE(SEND_ERROR "DBG HHP_FILE=${HHP_FILE}") - ADD_CUSTOM_TARGET(winhelp ${HTML_HELP_COMPILER} ${HHP_FILE}) - ADD_DEPENDENCIES (winhelp doc) - - IF (NOT TARGET_DOC_SKIP_INSTALL) - # install windows help? - # determine useful name for output file - # should be project and version unique to allow installing - # multiple projects into one global directory - IF (EXISTS "${PROJECT_BINARY_DIR}/Doc/html/index.chm") - IF (PROJECT_NAME) - SET(OUT "${PROJECT_NAME}") - ELSE (PROJECT_NAME) - SET(OUT "Documentation") # default - ENDIF(PROJECT_NAME) - IF (${PROJECT_NAME}_VERSION_MAJOR) - SET(OUT "${OUT}-${${PROJECT_NAME}_VERSION_MAJOR}") - IF (${PROJECT_NAME}_VERSION_MINOR) - SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_MINOR}") - IF (${PROJECT_NAME}_VERSION_PATCH) - SET(OUT "${OUT}.${${PROJECT_NAME}_VERSION_PATCH}") - ENDIF(${PROJECT_NAME}_VERSION_PATCH) - ENDIF(${PROJECT_NAME}_VERSION_MINOR) - ENDIF(${PROJECT_NAME}_VERSION_MAJOR) - # keep suffix - SET(OUT "${OUT}.chm") - - #MESSAGE("DBG ${PROJECT_BINARY_DIR}/Doc/html/index.chm \n${OUT}") - # create target used by install and package commands - INSTALL(FILES "${PROJECT_BINARY_DIR}/Doc/html/index.chm" - DESTINATION "doc" - RENAME "${OUT}" - ) - ENDIF(EXISTS "${PROJECT_BINARY_DIR}/Doc/html/index.chm") - ENDIF(NOT TARGET_DOC_SKIP_INSTALL) - - ENDIF(HTML_HELP_COMPILER) - # MESSAGE(SEND_ERROR "HTML_HELP_COMPILER=${HTML_HELP_COMPILER}") - ENDIF (WIN32) -ENDIF(DOXYGEN_FOUND) diff --git a/cmake/ACGOutput.cmake b/cmake/ACGOutput.cmake deleted file mode 100644 index d06e298c..00000000 --- a/cmake/ACGOutput.cmake +++ /dev/null @@ -1,49 +0,0 @@ -# fill string with spaces -macro (acg_format_string str length return) - string (LENGTH "${str}" _str_len) - math (EXPR _add_chr "${length} - ${_str_len}") - set (${return} "${str}") - while (_add_chr GREATER 0) - set (${return} "${${return}} ") - math (EXPR _add_chr "${_add_chr} - 1") - endwhile () -endmacro () - -# print message with color escape sequences if CMAKE_COLOR_MAKEFILE is set -string (ASCII 27 _escape) -function (acg_color_message _str) - if (CMAKE_COLOR_MAKEFILE AND NOT WIN32) - message (${_str}) - else () - string (REGEX REPLACE "${_escape}.[0123456789;]*m" "" __str ${_str}) - message (${__str}) - endif () -endfunction () - -# info header -function (acg_print_configure_header _id _name) - acg_format_string ("${_name}" 40 _project) - acg_format_string ("${${_id}_VERSION}" 40 _version) - acg_color_message ("\n${_escape}[40;37m************************************************************${_escape}[0m") - acg_color_message ("${_escape}[40;37m* ${_escape}[1;31mACG ${_escape}[0;40;34mBuildsystem${_escape}[0m${_escape}[40;37m *${_escape}[0m") - acg_color_message ("${_escape}[40;37m* *${_escape}[0m") - acg_color_message ("${_escape}[40;37m* Package : ${_escape}[32m${_project} ${_escape}[37m *${_escape}[0m") - acg_color_message ("${_escape}[40;37m* Version : ${_escape}[32m${_version} ${_escape}[37m *${_escape}[0m") - - if ( NOT WIN32 ) - # Just artistic. remove 2 spaces for release to make it look nicer ;-) - if (${CMAKE_BUILD_TYPE} MATCHES "Debug") - acg_color_message ("${_escape}[40;37m* Type : ${_escape}[32m${CMAKE_BUILD_TYPE} ${_escape}[37m *${_escape}[0m") - else() - acg_color_message ("${_escape}[40;37m* Type : ${_escape}[32m${CMAKE_BUILD_TYPE} ${_escape}[37m *${_escape}[0m") - endif() - endif() - - acg_color_message ("${_escape}[40;37m************************************************************${_escape}[0m") -endfunction () - -# info line -function (acg_print_configure_footer) - acg_color_message ("${_escape}[40;37m************************************************************${_escape}[0m\n") -endfunction () - diff --git a/cmake/ACGQt.cmake b/cmake/ACGQt.cmake deleted file mode 100644 index c3e6ed67..00000000 --- a/cmake/ACGQt.cmake +++ /dev/null @@ -1,105 +0,0 @@ -macro (acg_qt5) - - #try to find qt5 automatically - #for custom installation of qt5, dont use any of these variables - set (QT5_INSTALL_PATH "" CACHE PATH "Path to Qt5 directory which contains lib and include folder") - - if (EXISTS "${QT5_INSTALL_PATH}") - set (CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};${QT5_INSTALL_PATH}") - set (QT5_INSTALL_PATH_EXISTS TRUE) - endif(EXISTS "${QT5_INSTALL_PATH}") - - set(QT5_FINDER_FLAGS "" CACHE STRING "Flags for the Qt finder e.g. - NO_DEFAULT_PATH if no system installed Qt shall be found") - # compute default search paths - set(SUPPORTED_QT_VERSIONS 5.11 5.10 5.9 5.8 5.7 5.6) - foreach (suffix gcc_64 clang_64) - foreach(version ${SUPPORTED_QT_VERSIONS}) - list(APPEND QT_DEFAULT_PATH "~/sw/Qt/${version}/${suffix}") - endforeach() - endforeach() - - find_package (Qt5Core PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - if(Qt5Core_FOUND) - - if(Qt5Core_VERSION) # use the new version variable if it is set - set(Qt5Core_VERSION_STRING ${Qt5Core_VERSION}) - endif(Qt5Core_VERSION) - - string(REGEX REPLACE "^([0-9]+)\\.[0-9]+\\.[0-9]+.*" "\\1" QT_VERSION_MAJOR "${Qt5Core_VERSION_STRING}") - string(REGEX REPLACE "^[0-9]+\\.([0-9]+)\\.[0-9]+.*" "\\1" QT_VERSION_MINOR "${Qt5Core_VERSION_STRING}") - string(REGEX REPLACE "^[0-9]+\\.[0-9]+\\.([0-9]+).*" "\\1" QT_VERSION_PATCH "${Qt5Core_VERSION_STRING}") - - find_package (Qt5Widgets QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - find_package (Qt5Gui QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - find_package (Qt5OpenGL QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - - if (NOT WIN32 AND NOT APPLE) - find_package (Qt5X11Extras QUIET PATHS ${QT_DEFAULT_PATH} ${QT5_FINDER_FLAGS}) - endif () - - if (Qt5Core_FOUND AND Qt5Widgets_FOUND AND Qt5Gui_FOUND AND Qt5OpenGL_FOUND ) - set (QT5_FOUND TRUE) - endif() - - endif(Qt5Core_FOUND) - - if (QT5_FOUND) - - #set plugin dir - list(GET Qt5Gui_PLUGINS 0 _plugin) - if (_plugin) - get_target_property(_plugin_full ${_plugin} LOCATION) - get_filename_component(_plugin_dir ${_plugin_full} PATH) - set (QT_PLUGINS_DIR "${_plugin_dir}/../" CACHE PATH "Path to the qt plugin directory") - elseif(QT5_INSTALL_PATH_EXISTS) - set (QT_PLUGINS_DIR "${QT5_INSTALL_PATH}/plugins/" CACHE PATH "Path to the qt plugin directory") - elseif() - set (QT_PLUGINS_DIR "QT_PLUGIN_DIR_NOT_FOUND" CACHE PATH "Path to the qt plugin directory") - endif(_plugin) - - #set binary dir for fixupbundle - if(QT5_INSTALL_PATH_EXISTS) - set(_QT_BINARY_DIR "${QT5_INSTALL_PATH}/bin") - else() - get_target_property(_QT_BINARY_DIR ${Qt5Widgets_UIC_EXECUTABLE} LOCATION) - get_filename_component(_QT_BINARY_DIR ${_QT_BINARY_DIR} PATH) - endif(QT5_INSTALL_PATH_EXISTS) - - set (QT_BINARY_DIR "${_QT_BINARY_DIR}" CACHE PATH "Qt5 binary Directory") - mark_as_advanced(QT_BINARY_DIR) - - set (CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE) - - if (Qt5X11Extras_FOUND) - include_directories(${Qt5X11Extras_INCLUDE_DIRS}) - add_definitions(${Qt5X11Extras_DEFINITIONS}) - endif () - - if ( NOT MSVC ) - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") - endif() - - #adding QT_NO_DEBUG to all release modes. - # Note: for multi generators like msvc you cannot set this definition depending of - # the current build type, because it may change in the future inside the ide and not via cmake - if (MSVC_IDE) - set(CMAKE_C_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") - set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") - - set(CMAKE_C_FLAGS_MINSIZEREL "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") - set(CMAKE_CXX_FLAGS_MINSITEREL "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") - - set(CMAKE_C_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") - set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_C_FLAGS_RELEASE} /DQT_NO_DEBUG") - else(MSVC_IDE) - if(NOT CMAKE_BUILD_TYPE STREQUAL "Debug") - add_definitions(-DQT_NO_DEBUG) - endif() - endif(MSVC_IDE) - - # Enable automoc - set(CMAKE_AUTOMOC ON) - - endif (QT5_FOUND) -endmacro () From 5550fb0714946deb3bcd2dc7912cdbb2d3f8a0c7 Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Wed, 2 Dec 2020 12:28:10 +0100 Subject: [PATCH 04/21] use acg_create_doc_target --- Doc/CMakeLists.txt | 5 +---- cmake-library | 2 +- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/Doc/CMakeLists.txt b/Doc/CMakeLists.txt index f48d30ba..18d5bbab 100644 --- a/Doc/CMakeLists.txt +++ b/Doc/CMakeLists.txt @@ -3,10 +3,7 @@ include (ACGDoxygen) IF (DOXYGEN_FOUND) # Add a documentation install target - add_custom_target(doc-install COMMENT "Installing Documentation" VERBATIM ) - - # Build Documentation before installing it - add_dependencies(doc-install doc) + acg_create_doc_target(doc-install) if (TARGET doc-install) acg_copy_after_build (doc-install "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/html" "${CMAKE_INSTALL_PREFIX}/${ACG_PROJECT_DATADIR}/doc/html") diff --git a/cmake-library b/cmake-library index 9c4e20e2..408906cf 160000 --- a/cmake-library +++ b/cmake-library @@ -1 +1 @@ -Subproject commit 9c4e20e20c8cac5dcb82fd92efd8de0f4d517252 +Subproject commit 408906cf7d0708eb88265d7717eac097439847f9 From 555dd1fcb10b6a19d2972231d745de9e30a5df9c Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Wed, 2 Dec 2020 14:17:17 +0100 Subject: [PATCH 05/21] specify which Qt packages are required and enable automoc --- src/OpenMesh/Apps/CMakeLists.txt | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/OpenMesh/Apps/CMakeLists.txt b/src/OpenMesh/Apps/CMakeLists.txt index 8c775051..6ff72953 100644 --- a/src/OpenMesh/Apps/CMakeLists.txt +++ b/src/OpenMesh/Apps/CMakeLists.txt @@ -42,7 +42,14 @@ if ( BUILD_APPS ) # For the apps, we need qt and opengl to build them if (NOT QT5_FOUND) + set(QT5_REQUIRED_PACKAGES + Qt5Core + Qt5Widget + Qt5OpenGL + Qt5Gui + ) acg_qt5 () + set(CMAKE_AUTOMOC ON) endif() if ("${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles") From 79b3199ad5e39a809329228dd29d818810c51b04 Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Wed, 2 Dec 2020 14:33:27 +0100 Subject: [PATCH 06/21] only add fixbundle if QT5 was found --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 55ce9d83..514b6e91 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -154,7 +154,7 @@ endif() # Only call fixbundle, when we are building OpenMesh standalone if(${PROJECT_NAME} MATCHES "OpenMesh") - if (WIN32 AND BUILD_APPS ) + if (WIN32 AND BUILD_APPS AND QT5_FOUND) # prepare bundle generation cmake file and add a build target for it configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/cmake/fixbundle.cmake.win.in" "${CMAKE_CURRENT_BINARY_DIR}/fixbundle.win.cmake" @ONLY IMMEDIATE) @@ -167,7 +167,7 @@ if(${PROJECT_NAME} MATCHES "OpenMesh") endif() # On apple we do a fixbundle, which is only necessary for the apps and not for the libs - if (APPLE AND BUILD_APPS) + if (APPLE AND BUILD_APPS AND QT5_FOUND) # prepare bundle generation cmake file and add a build target for it configure_file ("${CMAKE_SOURCE_DIR}/cmake/fixbundle.cmake.in" "${CMAKE_BINARY_DIR}/fixbundle.cmake" @ONLY IMMEDIATE) From 3a2801fe767f4ec8f634dda9e634cf46f7e6be21 Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Wed, 2 Dec 2020 14:37:36 +0100 Subject: [PATCH 07/21] fix name of Qt5Widgets package --- src/OpenMesh/Apps/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenMesh/Apps/CMakeLists.txt b/src/OpenMesh/Apps/CMakeLists.txt index 6ff72953..97339617 100644 --- a/src/OpenMesh/Apps/CMakeLists.txt +++ b/src/OpenMesh/Apps/CMakeLists.txt @@ -44,7 +44,7 @@ if ( BUILD_APPS ) if (NOT QT5_FOUND) set(QT5_REQUIRED_PACKAGES Qt5Core - Qt5Widget + Qt5Widgets Qt5OpenGL Qt5Gui ) From 843fff12a393a27b23cc5d9d8970fbb53ee3b7db Mon Sep 17 00:00:00 2001 From: Martin Heistermann Date: Wed, 2 Dec 2020 19:26:21 +0100 Subject: [PATCH 08/21] CMake: use regular find_package(Eigen3) instead of custom old-school finder --- cmake/FindEIGEN3.cmake | 70 ------------------------------------ src/Unittests/CMakeLists.txt | 6 ++-- 2 files changed, 3 insertions(+), 73 deletions(-) delete mode 100644 cmake/FindEIGEN3.cmake diff --git a/cmake/FindEIGEN3.cmake b/cmake/FindEIGEN3.cmake deleted file mode 100644 index fa8fc4f7..00000000 --- a/cmake/FindEIGEN3.cmake +++ /dev/null @@ -1,70 +0,0 @@ -# - Try to find EIGEN3 -# Once done this will define -# EIGEN3_FOUND - System has EIGEN3 -# EIGEN3_INCLUDE_DIRS - The EIGEN3 include directories - -if (EIGEN3_INCLUDE_DIR) - # in cache already - set(EIGEN3_FOUND TRUE) - set(EIGEN3_INCLUDE_DIRS "${EIGEN3_INCLUDE_DIR}" ) -else (EIGEN3_INCLUDE_DIR) - -# Check if the base path is set -if ( NOT CMAKE_WINDOWS_LIBS_DIR ) - # This is the base directory for windows library search used in the finders we shipp. - set(CMAKE_WINDOWS_LIBS_DIR "c:/libs" CACHE STRING "Default Library search dir on windows." ) -endif() - -if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*Win64" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2012/x64/") -elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2012/x32/") -elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*Win64" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2013/x64/") -elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 12.*" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2013/x32/") -elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*Win64" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x64/") -elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 14.*" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2015/x32/") -elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*Win64" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x64/") -elseif ( CMAKE_GENERATOR MATCHES "^Visual Studio 15.*" ) - SET(VS_SEARCH_PATH "${CMAKE_WINDOWS_LIBS_DIR}/vs2017/x32/") -endif() - - -find_path( EIGEN3_INCLUDE_DIR - NAMES Eigen/Dense - PATHS $ENV{EIGEN_DIR} - /usr/include/eigen3 - /usr/local/include - /usr/local/include/eigen3/ - /opt/local/include/eigen3/ - "${CMAKE_WINDOWS_LIBS_DIR}/general/Eigen-3.3.4" - "${CMAKE_WINDOWS_LIBS_DIR}/general/Eigen-3.2.8" - "${CMAKE_WINDOWS_LIBS_DIR}/general/Eigen-3.2.6" - "${CMAKE_WINDOWS_LIBS_DIR}/Eigen-3.2.6" - "${CMAKE_WINDOWS_LIBS_DIR}/Eigen-3.2.6/include" - "${CMAKE_WINDOWS_LIBS_DIR}/Eigen-3.2.1" - "${CMAKE_WINDOWS_LIBS_DIR}/Eigen-3.2.1/include" - "${CMAKE_WINDOWS_LIBS_DIR}/Eigen-3.2/include" - "${CMAKE_WINDOWS_LIBS_DIR}/eigen3/include" - "${CMAKE_WINDOWS_LIBS_DIR}/eigen/include" - ${PROJECT_SOURCE_DIR}/MacOS/Libs/eigen3/include - ../../External/include - ${module_file_path}/../../../External/include - ) - -set(EIGEN3_INCLUDE_DIRS "${EIGEN3_INCLUDE_DIR}" ) - - -include(FindPackageHandleStandardArgs) -# handle the QUIETLY and REQUIRED arguments and set LIBCPLEX_FOUND to TRUE -# if all listed variables are TRUE -find_package_handle_standard_args(EIGEN3 DEFAULT_MSG - EIGEN3_INCLUDE_DIR) - -mark_as_advanced(EIGEN3_INCLUDE_DIR) - -endif(EIGEN3_INCLUDE_DIR) diff --git a/src/Unittests/CMakeLists.txt b/src/Unittests/CMakeLists.txt index e11060cf..1b115920 100644 --- a/src/Unittests/CMakeLists.txt +++ b/src/Unittests/CMakeLists.txt @@ -17,7 +17,7 @@ if ( OPENMESH_BUILD_UNIT_TESTS ) enable_testing() - find_package(EIGEN3) + find_package(Eigen3) # Set correct include paths so that the compiler can find the headers include_directories(${GTEST_INCLUDE_DIRS} ) @@ -27,9 +27,9 @@ if ( OPENMESH_BUILD_UNIT_TESTS ) link_directories(${GTEST_LIBRARY_DIR} ) - if (EIGEN3_FOUND) + if (TARGET Eigen3::Eigen) add_definitions( -DENABLE_EIGEN3_TEST ) - include_directories(${EIGEN3_INCLUDE_DIR}) + link_libraries(Eigen3::Eigen) endif() if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" ) From d0e517ebe40ac645c06e7086626d5b119a4e464c Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Mon, 7 Dec 2020 12:36:40 +0100 Subject: [PATCH 09/21] configure cmake file even if QT5 is not found --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 514b6e91..4ac580a5 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -154,7 +154,7 @@ endif() # Only call fixbundle, when we are building OpenMesh standalone if(${PROJECT_NAME} MATCHES "OpenMesh") - if (WIN32 AND BUILD_APPS AND QT5_FOUND) + if (WIN32 AND BUILD_APPS) # prepare bundle generation cmake file and add a build target for it configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/cmake/fixbundle.cmake.win.in" "${CMAKE_CURRENT_BINARY_DIR}/fixbundle.win.cmake" @ONLY IMMEDIATE) @@ -167,7 +167,7 @@ if(${PROJECT_NAME} MATCHES "OpenMesh") endif() # On apple we do a fixbundle, which is only necessary for the apps and not for the libs - if (APPLE AND BUILD_APPS AND QT5_FOUND) + if (APPLE AND BUILD_APPS) # prepare bundle generation cmake file and add a build target for it configure_file ("${CMAKE_SOURCE_DIR}/cmake/fixbundle.cmake.in" "${CMAKE_BINARY_DIR}/fixbundle.cmake" @ONLY IMMEDIATE) From 50363592bebd18b2bccadd410e62cfd86795c141 Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Mon, 7 Dec 2020 13:18:53 +0100 Subject: [PATCH 10/21] renaming of functions and variables in cmake-library --- CMakeLists.txt | 10 ++++---- Doc/CMakeLists.txt | 6 ++--- Doc/Tutorial/CMakeLists.txt | 4 ++-- cmake-library | 2 +- src/OpenMesh/Apps/CMakeLists.txt | 4 ++-- .../Decimating/DecimaterGui/CMakeLists.txt | 6 ++--- .../commandlineDecimater/CMakeLists.txt | 4 ++-- src/OpenMesh/Apps/Dualizer/CMakeLists.txt | 4 ++-- src/OpenMesh/Apps/ProgViewer/CMakeLists.txt | 6 ++--- src/OpenMesh/Apps/QtViewer/CMakeLists.txt | 6 ++--- src/OpenMesh/Apps/Smoothing/CMakeLists.txt | 4 ++-- .../Subdivider/SubdividerGui/CMakeLists.txt | 6 ++--- .../CMakeLists.txt | 4 ++-- .../commandlineSubdivider/CMakeLists.txt | 4 ++-- .../Apps/VDProgMesh/Analyzer/CMakeLists.txt | 4 ++-- .../VDProgMesh/Synthesizer/CMakeLists.txt | 6 ++--- .../VDProgMesh/mkbalancedpm/CMakeLists.txt | 4 ++-- src/OpenMesh/Apps/mconvert/CMakeLists.txt | 4 ++-- src/OpenMesh/Core/CMakeLists.txt | 22 ++++++++--------- src/OpenMesh/Tools/CMakeLists.txt | 24 +++++++++---------- src/Unittests/CMakeLists.txt | 10 ++++---- 21 files changed, 72 insertions(+), 72 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 4ac580a5..46c329ef 100755 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -41,9 +41,9 @@ set (CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CMAKE_SOURCE_DIR}/cmake ${CMAKE_CU set (CMAKE_DEBUG_POSTFIX "d") # include our cmake files -include (ACGCommon) +include (VCICommon) -acg_get_version () +vci_get_version () # Disable package building when built as an external library @@ -51,8 +51,8 @@ if(${PROJECT_NAME} MATCHES "OpenMesh") include(OpenMeshPackage) endif() -include (ACGOutput) -include(ACGQt) +include (VCIOutput) +include(VCIQt) # ======================================================================== # Definitions @@ -203,4 +203,4 @@ install(EXPORT OpenMeshConfig DESTINATION share/OpenMesh/cmake) export(TARGETS OpenMeshCore OpenMeshTools FILE OpenMeshConfig.cmake) # display results -acg_print_configure_header (OPENMESH "OpenMesh") +vci_print_configure_header (OPENMESH "OpenMesh") diff --git a/Doc/CMakeLists.txt b/Doc/CMakeLists.txt index 18d5bbab..c2d386dc 100644 --- a/Doc/CMakeLists.txt +++ b/Doc/CMakeLists.txt @@ -1,12 +1,12 @@ -include (ACGDoxygen) +include (VCIDoxygen) IF (DOXYGEN_FOUND) # Add a documentation install target - acg_create_doc_target(doc-install) + vci_create_doc_target(doc-install) if (TARGET doc-install) - acg_copy_after_build (doc-install "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/html" "${CMAKE_INSTALL_PREFIX}/${ACG_PROJECT_DATADIR}/doc/html") + vci_copy_after_build (doc-install "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/html" "${CMAKE_INSTALL_PREFIX}/${ACG_PROJECT_DATADIR}/doc/html") endif() ENDIF(DOXYGEN_FOUND) diff --git a/Doc/Tutorial/CMakeLists.txt b/Doc/Tutorial/CMakeLists.txt index 70fe7aa9..e4b64da9 100644 --- a/Doc/Tutorial/CMakeLists.txt +++ b/Doc/Tutorial/CMakeLists.txt @@ -1,4 +1,4 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../../.. @@ -11,7 +11,7 @@ set (targetName MyOwnProject) acg_append_files (headers "*.hh" .) acg_append_files (sources "*.cc" .) -acg_add_executable (${targetName} ${headers} ${sources}) +vci_add_executable (${targetName} ${headers} ${sources}) target_link_libraries (${targetName} OpenMeshCore diff --git a/cmake-library b/cmake-library index 408906cf..a4938523 160000 --- a/cmake-library +++ b/cmake-library @@ -1 +1 @@ -Subproject commit 408906cf7d0708eb88265d7717eac097439847f9 +Subproject commit a49385233272aa9a98c626c6adc5ba213ab2c811 diff --git a/src/OpenMesh/Apps/CMakeLists.txt b/src/OpenMesh/Apps/CMakeLists.txt index 97339617..6ecb9211 100644 --- a/src/OpenMesh/Apps/CMakeLists.txt +++ b/src/OpenMesh/Apps/CMakeLists.txt @@ -1,4 +1,4 @@ -include (ACGCommon) +include (VCICommon) if ( NOT DEFINED BUILD_APPS ) set( BUILD_APPS true CACHE BOOL "Enable or disable building of apps" ) @@ -48,7 +48,7 @@ if ( BUILD_APPS ) Qt5OpenGL Qt5Gui ) - acg_qt5 () + vci_qt5 () set(CMAKE_AUTOMOC ON) endif() diff --git a/src/OpenMesh/Apps/Decimating/DecimaterGui/CMakeLists.txt b/src/OpenMesh/Apps/Decimating/DecimaterGui/CMakeLists.txt index 9e86fba5..8baa357e 100644 --- a/src/OpenMesh/Apps/Decimating/DecimaterGui/CMakeLists.txt +++ b/src/OpenMesh/Apps/Decimating/DecimaterGui/CMakeLists.txt @@ -1,4 +1,4 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../../../.. @@ -21,9 +21,9 @@ set (sources ) if (WIN32) - acg_add_executable (DecimaterGui WIN32 ${sources} ${headers}) + vci_add_executable (DecimaterGui WIN32 ${sources} ${headers}) else () - acg_add_executable (DecimaterGui ${sources} ${headers} ) + vci_add_executable (DecimaterGui ${sources} ${headers} ) endif () target_link_libraries (DecimaterGui diff --git a/src/OpenMesh/Apps/Decimating/commandlineDecimater/CMakeLists.txt b/src/OpenMesh/Apps/Decimating/commandlineDecimater/CMakeLists.txt index 2fb5a47d..de6118f3 100644 --- a/src/OpenMesh/Apps/Decimating/commandlineDecimater/CMakeLists.txt +++ b/src/OpenMesh/Apps/Decimating/commandlineDecimater/CMakeLists.txt @@ -1,11 +1,11 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../../../.. ${CMAKE_CURRENT_SOURCE_DIR} ) -acg_add_executable (commandlineDecimater ../decimater.cc) +vci_add_executable (commandlineDecimater ../decimater.cc) target_link_libraries (commandlineDecimater OpenMeshCore diff --git a/src/OpenMesh/Apps/Dualizer/CMakeLists.txt b/src/OpenMesh/Apps/Dualizer/CMakeLists.txt index 59b60ea7..d4cbac17 100644 --- a/src/OpenMesh/Apps/Dualizer/CMakeLists.txt +++ b/src/OpenMesh/Apps/Dualizer/CMakeLists.txt @@ -1,10 +1,10 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../../.. ) -acg_add_executable (Dualizer dualizer.cc) +vci_add_executable (Dualizer dualizer.cc) target_link_libraries (Dualizer OpenMeshCore diff --git a/src/OpenMesh/Apps/ProgViewer/CMakeLists.txt b/src/OpenMesh/Apps/ProgViewer/CMakeLists.txt index b2f5eb90..c0adbdff 100644 --- a/src/OpenMesh/Apps/ProgViewer/CMakeLists.txt +++ b/src/OpenMesh/Apps/ProgViewer/CMakeLists.txt @@ -1,4 +1,4 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../../.. @@ -20,9 +20,9 @@ set( sources ) if (WIN32) - acg_add_executable( ProgViewer WIN32 ${sources} ${headers}) + vci_add_executable( ProgViewer WIN32 ${sources} ${headers}) else () - acg_add_executable( ProgViewer ${sources} ${headers}) + vci_add_executable( ProgViewer ${sources} ${headers}) endif () target_link_libraries ( ProgViewer diff --git a/src/OpenMesh/Apps/QtViewer/CMakeLists.txt b/src/OpenMesh/Apps/QtViewer/CMakeLists.txt index 231fea48..aa704908 100644 --- a/src/OpenMesh/Apps/QtViewer/CMakeLists.txt +++ b/src/OpenMesh/Apps/QtViewer/CMakeLists.txt @@ -1,4 +1,4 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../../.. @@ -22,9 +22,9 @@ set (headers ) if (WIN32) - acg_add_executable (QtViewer WIN32 ${sources} ${headers}) + vci_add_executable (QtViewer WIN32 ${sources} ${headers}) else () - acg_add_executable (QtViewer ${sources} ${headers}) + vci_add_executable (QtViewer ${sources} ${headers}) endif () target_link_libraries (QtViewer diff --git a/src/OpenMesh/Apps/Smoothing/CMakeLists.txt b/src/OpenMesh/Apps/Smoothing/CMakeLists.txt index dc397424..e3c24bf8 100644 --- a/src/OpenMesh/Apps/Smoothing/CMakeLists.txt +++ b/src/OpenMesh/Apps/Smoothing/CMakeLists.txt @@ -1,11 +1,11 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../../.. ${CMAKE_CURRENT_SOURCE_DIR} ) -acg_add_executable (Smoothing smooth.cc) +vci_add_executable (Smoothing smooth.cc) target_link_libraries (Smoothing OpenMeshCore diff --git a/src/OpenMesh/Apps/Subdivider/SubdividerGui/CMakeLists.txt b/src/OpenMesh/Apps/Subdivider/SubdividerGui/CMakeLists.txt index 85bec8d4..81e87499 100644 --- a/src/OpenMesh/Apps/Subdivider/SubdividerGui/CMakeLists.txt +++ b/src/OpenMesh/Apps/Subdivider/SubdividerGui/CMakeLists.txt @@ -1,4 +1,4 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../../../.. @@ -20,9 +20,9 @@ set (sources ) if (WIN32) - acg_add_executable (SubdividerGui WIN32 ${sources} ${headers}) + vci_add_executable (SubdividerGui WIN32 ${sources} ${headers}) else () - acg_add_executable (SubdividerGui ${sources} ${headers}) + vci_add_executable (SubdividerGui ${sources} ${headers}) endif () target_link_libraries (SubdividerGui diff --git a/src/OpenMesh/Apps/Subdivider/commandlineAdaptiveSubdivider/CMakeLists.txt b/src/OpenMesh/Apps/Subdivider/commandlineAdaptiveSubdivider/CMakeLists.txt index fab21891..b89243b0 100644 --- a/src/OpenMesh/Apps/Subdivider/commandlineAdaptiveSubdivider/CMakeLists.txt +++ b/src/OpenMesh/Apps/Subdivider/commandlineAdaptiveSubdivider/CMakeLists.txt @@ -1,11 +1,11 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../../../.. ${CMAKE_CURRENT_SOURCE_DIR} ) -acg_add_executable (commandlineAdaptiveSubdivider ../adaptive_subdivider.cc) +vci_add_executable (commandlineAdaptiveSubdivider ../adaptive_subdivider.cc) target_link_libraries (commandlineAdaptiveSubdivider OpenMeshCore diff --git a/src/OpenMesh/Apps/Subdivider/commandlineSubdivider/CMakeLists.txt b/src/OpenMesh/Apps/Subdivider/commandlineSubdivider/CMakeLists.txt index 7382747e..d341ad6b 100644 --- a/src/OpenMesh/Apps/Subdivider/commandlineSubdivider/CMakeLists.txt +++ b/src/OpenMesh/Apps/Subdivider/commandlineSubdivider/CMakeLists.txt @@ -1,11 +1,11 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../../../.. ${CMAKE_CURRENT_SOURCE_DIR} ) -acg_add_executable (commandlineSubdivider ../subdivider.cc) +vci_add_executable (commandlineSubdivider ../subdivider.cc) target_link_libraries (commandlineSubdivider OpenMeshCore diff --git a/src/OpenMesh/Apps/VDProgMesh/Analyzer/CMakeLists.txt b/src/OpenMesh/Apps/VDProgMesh/Analyzer/CMakeLists.txt index e79f19ab..6b73f101 100644 --- a/src/OpenMesh/Apps/VDProgMesh/Analyzer/CMakeLists.txt +++ b/src/OpenMesh/Apps/VDProgMesh/Analyzer/CMakeLists.txt @@ -1,11 +1,11 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../../../.. ${CMAKE_CURRENT_SOURCE_DIR} ) -acg_add_executable (Analyzer vdpmanalyzer.cc) +vci_add_executable (Analyzer vdpmanalyzer.cc) target_link_libraries (Analyzer OpenMeshCore diff --git a/src/OpenMesh/Apps/VDProgMesh/Synthesizer/CMakeLists.txt b/src/OpenMesh/Apps/VDProgMesh/Synthesizer/CMakeLists.txt index ec97e48d..c39d3459 100644 --- a/src/OpenMesh/Apps/VDProgMesh/Synthesizer/CMakeLists.txt +++ b/src/OpenMesh/Apps/VDProgMesh/Synthesizer/CMakeLists.txt @@ -1,4 +1,4 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../../../.. @@ -17,9 +17,9 @@ set (sources if (WIN32) - acg_add_executable (Synthesizer WIN32 ${sources} ${headers}) + vci_add_executable (Synthesizer WIN32 ${sources} ${headers}) else () - acg_add_executable (Synthesizer ${sources} ${headers}) + vci_add_executable (Synthesizer ${sources} ${headers}) endif () target_link_libraries (Synthesizer diff --git a/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/CMakeLists.txt b/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/CMakeLists.txt index edb4ff54..7d8e1a10 100644 --- a/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/CMakeLists.txt +++ b/src/OpenMesh/Apps/VDProgMesh/mkbalancedpm/CMakeLists.txt @@ -1,11 +1,11 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../../../.. ${CMAKE_CURRENT_SOURCE_DIR} ) -acg_add_executable (mkbalancedpm mkbalancedpm.cc) +vci_add_executable (mkbalancedpm mkbalancedpm.cc) target_link_libraries (mkbalancedpm OpenMeshCore diff --git a/src/OpenMesh/Apps/mconvert/CMakeLists.txt b/src/OpenMesh/Apps/mconvert/CMakeLists.txt index 0ab863b1..2aa7f742 100644 --- a/src/OpenMesh/Apps/mconvert/CMakeLists.txt +++ b/src/OpenMesh/Apps/mconvert/CMakeLists.txt @@ -1,10 +1,10 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../../.. ) -acg_add_executable (mconvert mconvert.cc) +vci_add_executable (mconvert mconvert.cc) target_link_libraries (mconvert OpenMeshCore diff --git a/src/OpenMesh/Core/CMakeLists.txt b/src/OpenMesh/Core/CMakeLists.txt index abe7a101..e92cda32 100644 --- a/src/OpenMesh/Core/CMakeLists.txt +++ b/src/OpenMesh/Core/CMakeLists.txt @@ -1,4 +1,4 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../.. @@ -21,12 +21,12 @@ set (directories ) # collect all header and source files -acg_append_files (headers "*.hh" ${directories}) -acg_append_files (sources "*.cc" ${directories}) +vci_append_files (headers "*.hh" ${directories}) +vci_append_files (sources "*.cc" ${directories}) # Disable Library installation when not building OpenMesh on its own but as part of another project! if ( NOT ${PROJECT_NAME} MATCHES "OpenMesh") - set(ACG_NO_LIBRARY_INSTALL true) + set(VCI_NO_LIBRARY_INSTALL true) endif() @@ -34,14 +34,14 @@ if (WIN32) if ( OPENMESH_BUILD_SHARED ) add_definitions( -DOPENMESHDLL -DBUILDOPENMESHDLL) - acg_add_library (OpenMeshCore SHARED ${sources} ${headers}) + vci_add_library (OpenMeshCore SHARED ${sources} ${headers}) else() # OpenMesh has no dll exports so we have to build a static library on windows - acg_add_library (OpenMeshCore STATIC ${sources} ${headers}) + vci_add_library (OpenMeshCore STATIC ${sources} ${headers}) endif() else () - acg_add_library (OpenMeshCore SHAREDANDSTATIC ${sources} ${headers}) + vci_add_library (OpenMeshCore SHAREDANDSTATIC ${sources} ${headers}) set_target_properties (OpenMeshCore PROPERTIES VERSION ${OPENMESH_VERSION_MAJOR}.${OPENMESH_VERSION_MINOR} SOVERSION ${OPENMESH_VERSION_MAJOR}.${OPENMESH_VERSION_MINOR} ) @@ -76,7 +76,7 @@ endif() # Install Header Files (Apple) -if ( NOT ACG_PROJECT_MACOS_BUNDLE AND APPLE ) +if ( NOT VCI_PROJECT_MACOS_BUNDLE AND APPLE ) FILE(GLOB files_install_Geometry "${CMAKE_CURRENT_SOURCE_DIR}/Geometry/*.hh" ) FILE(GLOB files_install_IO "${CMAKE_CURRENT_SOURCE_DIR}/IO/*.hh" "${CMAKE_CURRENT_SOURCE_DIR}/IO/*.inl" ) FILE(GLOB files_install_IO_importer "${CMAKE_CURRENT_SOURCE_DIR}/IO/importer/*.hh" ) @@ -137,7 +137,7 @@ target_include_directories(OpenMeshCore PUBLIC $) install(TARGETS OpenMeshCore EXPORT OpenMeshConfig - ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR} - LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR} - RUNTIME DESTINATION ${ACG_PROJECT_BINDIR}) + ARCHIVE DESTINATION ${VCI_PROJECT_LIBDIR} + LIBRARY DESTINATION ${VCI_PROJECT_LIBDIR} + RUNTIME DESTINATION ${VCI_PROJECT_BINDIR}) diff --git a/src/OpenMesh/Tools/CMakeLists.txt b/src/OpenMesh/Tools/CMakeLists.txt index fcba8a94..5659d133 100644 --- a/src/OpenMesh/Tools/CMakeLists.txt +++ b/src/OpenMesh/Tools/CMakeLists.txt @@ -1,4 +1,4 @@ -include (ACGCommon) +include (VCICommon) include_directories ( ../.. @@ -19,16 +19,16 @@ set (directories ) # collect all header and source files -acg_append_files (headers "*.hh" ${directories}) -acg_append_files (sources "*.cc" ${directories}) +vci_append_files (headers "*.hh" ${directories}) +vci_append_files (sources "*.cc" ${directories}) IF(WIN32 AND NOT MINGW) - acg_append_files (sources "*.c" ${directories}) + vci_append_files (sources "*.c" ${directories}) ENDIF(WIN32 AND NOT MINGW) # Disable Library installation when not building OpenMesh on its own but as part of another project! if ( NOT ${PROJECT_NAME} MATCHES "OpenMesh") - set(ACG_NO_LIBRARY_INSTALL true) + set(VCI_NO_LIBRARY_INSTALL true) endif() @@ -36,14 +36,14 @@ if (WIN32) if ( OPENMESH_BUILD_SHARED ) add_definitions( -DOPENMESHDLL -DBUILDOPENMESHDLL) - acg_add_library (OpenMeshTools SHARED ${sources} ${headers}) + vci_add_library (OpenMeshTools SHARED ${sources} ${headers}) else() # OpenMesh has no dll exports so we have to build a static library on windows - acg_add_library (OpenMeshTools STATIC ${sources} ${headers}) + vci_add_library (OpenMeshTools STATIC ${sources} ${headers}) endif() else () - acg_add_library (OpenMeshTools SHAREDANDSTATIC ${sources} ${headers}) + vci_add_library (OpenMeshTools SHAREDANDSTATIC ${sources} ${headers}) set_target_properties (OpenMeshTools PROPERTIES VERSION ${OPENMESH_VERSION_MAJOR}.${OPENMESH_VERSION_MINOR} SOVERSION ${OPENMESH_VERSION_MAJOR}.${OPENMESH_VERSION_MINOR} ) endif () @@ -74,7 +74,7 @@ endif() # Install Header Files (Apple) -if ( NOT ACG_PROJECT_MACOS_BUNDLE AND APPLE ) +if ( NOT VCI_PROJECT_MACOS_BUNDLE AND APPLE ) FILE(GLOB files_install_Decimater "${CMAKE_CURRENT_SOURCE_DIR}/Decimater/*.hh" ) FILE(GLOB files_install_Dualizer "${CMAKE_CURRENT_SOURCE_DIR}/Dualizer/*.hh" ) FILE(GLOB files_install_KERNEL_OSG "${CMAKE_CURRENT_SOURCE_DIR}/Kernel_OSG/*.hh" ) @@ -120,7 +120,7 @@ target_include_directories(OpenMeshTools PUBLIC $) install(TARGETS OpenMeshTools EXPORT OpenMeshConfig - ARCHIVE DESTINATION ${ACG_PROJECT_LIBDIR} - LIBRARY DESTINATION ${ACG_PROJECT_LIBDIR} - RUNTIME DESTINATION ${ACG_PROJECT_BINDIR}) + ARCHIVE DESTINATION ${VCI_PROJECT_LIBDIR} + LIBRARY DESTINATION ${VCI_PROJECT_LIBDIR} + RUNTIME DESTINATION ${VCI_PROJECT_BINDIR}) diff --git a/src/Unittests/CMakeLists.txt b/src/Unittests/CMakeLists.txt index e11060cf..c21a0080 100644 --- a/src/Unittests/CMakeLists.txt +++ b/src/Unittests/CMakeLists.txt @@ -1,4 +1,4 @@ -include (ACGCommon) +include (VCICommon) include_directories ( .. @@ -39,13 +39,13 @@ if ( OPENMESH_BUILD_UNIT_TESTS ) # Create new target named unittests_hexmeshing FILE(GLOB UNITTEST_SRC *.cc) # Create unittest executable - acg_add_executable(unittests ${UNITTEST_SRC}) - acg_add_executable(unittests_customvec ${UNITTEST_SRC}) - acg_add_executable(unittests_doublevec ${UNITTEST_SRC}) + vci_add_executable(unittests ${UNITTEST_SRC}) + vci_add_executable(unittests_customvec ${UNITTEST_SRC}) + vci_add_executable(unittests_doublevec ${UNITTEST_SRC}) target_compile_definitions(unittests_customvec PRIVATE TEST_CUSTOM_TRAITS) target_compile_definitions(unittests_doublevec PRIVATE TEST_DOUBLE_TRAITS) - # For the unittest we don't want the install rpath as set by acg_add_executable + # For the unittest we don't want the install rpath as set by vci_add_executable set_target_properties ( unittests PROPERTIES BUILD_WITH_INSTALL_RPATH 0 ) set_target_properties ( unittests_customvec PROPERTIES BUILD_WITH_INSTALL_RPATH 0 ) set_target_properties ( unittests_doublevec PROPERTIES BUILD_WITH_INSTALL_RPATH 0 ) From bc7d5044a530aba7c5d9b54e4974407c9f4681a1 Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Mon, 7 Dec 2020 14:06:26 +0100 Subject: [PATCH 11/21] more renaming of acg to vci --- Doc/CMakeLists.txt | 2 +- Doc/Tutorial/CMakeLists.txt | 4 ++-- Doc/doxy.config.in | 4 ++-- Doc/html/{acg_footer.html => vci_footer.html} | 0 Doc/images/src/mesh.collapse.tex | 4 ++-- Doc/images/src/mesh.flip.tex | 4 ++-- cmake/OpenMeshPackage.cmake | 7 ++----- src/Unittests/CMakeLists.txt | 6 +++--- 8 files changed, 14 insertions(+), 17 deletions(-) rename Doc/html/{acg_footer.html => vci_footer.html} (100%) diff --git a/Doc/CMakeLists.txt b/Doc/CMakeLists.txt index c2d386dc..0fe840db 100644 --- a/Doc/CMakeLists.txt +++ b/Doc/CMakeLists.txt @@ -6,7 +6,7 @@ IF (DOXYGEN_FOUND) vci_create_doc_target(doc-install) if (TARGET doc-install) - vci_copy_after_build (doc-install "${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Doc/html" "${CMAKE_INSTALL_PREFIX}/${ACG_PROJECT_DATADIR}/doc/html") + vci_copy_after_build (doc-install "${CMAKE_BINARY_DIR}/Build/${VCI_PROJECT_DATADIR}/Doc/html" "${CMAKE_INSTALL_PREFIX}/${VCI_PROJECT_DATADIR}/doc/html") endif() ENDIF(DOXYGEN_FOUND) diff --git a/Doc/Tutorial/CMakeLists.txt b/Doc/Tutorial/CMakeLists.txt index e4b64da9..0567214f 100644 --- a/Doc/Tutorial/CMakeLists.txt +++ b/Doc/Tutorial/CMakeLists.txt @@ -8,8 +8,8 @@ include_directories ( set (targetName MyOwnProject) # collect all header and source files -acg_append_files (headers "*.hh" .) -acg_append_files (sources "*.cc" .) +vci_append_files (headers "*.hh" .) +vci_append_files (sources "*.cc" .) vci_add_executable (${targetName} ${headers} ${sources}) diff --git a/Doc/doxy.config.in b/Doc/doxy.config.in index ccfecd2c..1e35d561 100644 --- a/Doc/doxy.config.in +++ b/Doc/doxy.config.in @@ -58,7 +58,7 @@ PROJECT_LOGO = @CMAKE_CURRENT_SOURCE_DIR@/images/rwth_vci_rgb.jpg # entered, it will be relative to the location where doxygen was started. If # left blank the current directory will be used. -OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/Build/@ACG_PROJECT_DATADIR@/Doc +OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/Build/@VCI_PROJECT_DATADIR@/Doc # If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub- # directories (in 2 levels) under the output directory of each output format and @@ -1128,7 +1128,7 @@ HTML_HEADER = # that doxygen normally uses. # This tag requires that the tag GENERATE_HTML is set to YES. -HTML_FOOTER = @CMAKE_CURRENT_SOURCE_DIR@/html/acg_footer.html +HTML_FOOTER = @CMAKE_CURRENT_SOURCE_DIR@/html/vci_footer.html # The HTML_STYLESHEET tag can be used to specify a user-defined cascading style # sheet that is used by each HTML page. It can be used to fine-tune the look of diff --git a/Doc/html/acg_footer.html b/Doc/html/vci_footer.html similarity index 100% rename from Doc/html/acg_footer.html rename to Doc/html/vci_footer.html diff --git a/Doc/images/src/mesh.collapse.tex b/Doc/images/src/mesh.collapse.tex index 12fc437c..63310a5e 100644 --- a/Doc/images/src/mesh.collapse.tex +++ b/Doc/images/src/mesh.collapse.tex @@ -5,13 +5,13 @@ \usepackage{tikz} \usepackage{color} -\definecolor{ACG}{RGB}{55,91,64} +\definecolor{VCI}{RGB}{55,91,64} \begin{document} \begin{center} -%\colorbox{ACG}{ +%\colorbox{VCI}{ \begin{tikzpicture} [ diff --git a/Doc/images/src/mesh.flip.tex b/Doc/images/src/mesh.flip.tex index 8bf5e9c1..c6118971 100644 --- a/Doc/images/src/mesh.flip.tex +++ b/Doc/images/src/mesh.flip.tex @@ -5,13 +5,13 @@ \usepackage{tikz} \usepackage{color} -\definecolor{ACG}{RGB}{55,91,64} +\definecolor{VCI}{RGB}{55,91,64} \begin{document} \begin{center} -%\colorbox{ACG}{ +%\colorbox{VCI}{ \begin{tikzpicture} [ diff --git a/cmake/OpenMeshPackage.cmake b/cmake/OpenMeshPackage.cmake index 6892b43b..39b36b21 100644 --- a/cmake/OpenMeshPackage.cmake +++ b/cmake/OpenMeshPackage.cmake @@ -7,7 +7,7 @@ option ( # set name set (CPACK_PACKAGE_NAME "OpenMesh") -set (CPACK_PACKAGE_VENDOR "ACG") +set (CPACK_PACKAGE_VENDOR "VCI") # set version set (CPACK_PACKAGE_VERSION_MAJOR "${OPENMESH_VERSION_MAJOR}") @@ -47,9 +47,6 @@ list (APPEND CPACK_SOURCE_IGNORE_FILES "/tmp/") list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*\\\\.kdevelop") list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*\\\\.kdevses") -list (APPEND CPACK_SOURCE_IGNORE_FILES "/ACG/lib/") -list (APPEND CPACK_SOURCE_IGNORE_FILES "/ACG/include/") - if (DISABLE_QMAKE_BUILD) list (APPEND CPACK_SOURCE_IGNORE_FILES "/.*\\\\.pro") list (APPEND CPACK_SOURCE_IGNORE_FILES "/qmake/") @@ -123,7 +120,7 @@ endif () if (WIN32) set (CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS_SKIP "true") # include (InstallRequiredSystemLibraries) - install (PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${ACG_PROJECT_BINDIR}) + install (PROGRAMS ${CMAKE_INSTALL_SYSTEM_RUNTIME_LIBS} DESTINATION ${VCI_PROJECT_BINDIR}) else () include (InstallRequiredSystemLibraries) endif () diff --git a/src/Unittests/CMakeLists.txt b/src/Unittests/CMakeLists.txt index c21a0080..09b15e13 100644 --- a/src/Unittests/CMakeLists.txt +++ b/src/Unittests/CMakeLists.txt @@ -120,9 +120,9 @@ if ( OPENMESH_BUILD_UNIT_TESTS ) endforeach(TAR) endif() - acg_copy_after_build(unittests ${CMAKE_CURRENT_SOURCE_DIR}/TestFiles ${CMAKE_BINARY_DIR}/Unittests/) - acg_copy_after_build(unittests_customvec ${CMAKE_CURRENT_SOURCE_DIR}/TestFiles ${CMAKE_BINARY_DIR}/Unittests/) - acg_copy_after_build(unittests_doublevec ${CMAKE_CURRENT_SOURCE_DIR}/TestFiles ${CMAKE_BINARY_DIR}/Unittests/) + vci_copy_after_build(unittests ${CMAKE_CURRENT_SOURCE_DIR}/TestFiles ${CMAKE_BINARY_DIR}/Unittests/) + vci_copy_after_build(unittests_customvec ${CMAKE_CURRENT_SOURCE_DIR}/TestFiles ${CMAKE_BINARY_DIR}/Unittests/) + vci_copy_after_build(unittests_doublevec ${CMAKE_CURRENT_SOURCE_DIR}/TestFiles ${CMAKE_BINARY_DIR}/Unittests/) add_test(NAME AllTestsIn_OpenMesh_tests WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/Unittests" COMMAND "${CMAKE_BINARY_DIR}/Unittests/unittests") add_test(NAME AllTestsIn_OpenMesh_tests_with_minimal_vector WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/Unittests" COMMAND "${CMAKE_BINARY_DIR}/Unittests/unittests_customvec") From 139719433ac9cd35c79a0152988f77b15d8d6d9d Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Mon, 7 Dec 2020 14:07:03 +0100 Subject: [PATCH 12/21] fix wrong endif comment --- src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh b/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh index b2a00fd3..1333662b 100644 --- a/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh +++ b/src/OpenMesh/Tools/Decimater/ModNormalFlippingT.hh @@ -197,6 +197,6 @@ private: } // END_NS_DECIMATER } // END_NS_OPENMESH //============================================================================= -#endif // OPENACG_MODNORMALFLIPPING_HH defined +#endif // OPENMESH_DECIMATER_MODNORMALFLIPPING_HH defined //============================================================================= From 2372e6ce4e32d67d2993779da54fa4569e44bd5a Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Mon, 7 Dec 2020 14:07:17 +0100 Subject: [PATCH 13/21] remove deprecated code --- src/OpenMesh/Core/System/compiler.hh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/src/OpenMesh/Core/System/compiler.hh b/src/OpenMesh/Core/System/compiler.hh index b74ed041..c14b6c20 100644 --- a/src/OpenMesh/Core/System/compiler.hh +++ b/src/OpenMesh/Core/System/compiler.hh @@ -47,12 +47,6 @@ //============================================================================= -#if defined(ACGMAKE_STATIC_BUILD) -# define OM_STATIC_BUILD 1 -#endif - -//============================================================================= - #if defined(_DEBUG) || defined(DEBUG) # define OM_DEBUG #endif From d095500098863f4aac75d3e51e81a67e489c5213 Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Mon, 7 Dec 2020 14:07:41 +0100 Subject: [PATCH 14/21] fix wrong doxygen path --- src/OpenMesh/Core/Geometry/NormalConeT.hh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenMesh/Core/Geometry/NormalConeT.hh b/src/OpenMesh/Core/Geometry/NormalConeT.hh index 0b1cc6a1..cad08037 100644 --- a/src/OpenMesh/Core/Geometry/NormalConeT.hh +++ b/src/OpenMesh/Core/Geometry/NormalConeT.hh @@ -72,7 +72,7 @@ namespace OpenMesh { //== CLASS DEFINITION ========================================================= -/** /class NormalCone NormalCone.hh +/** /class NormalCone NormalCone.hh NormalCone that can be merged with other normal cones. Provides the center normal and the opening angle. From 577f21e7a180c96a53a5bf32bd531e7bbd8fdf02 Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Mon, 7 Dec 2020 14:10:41 +0100 Subject: [PATCH 15/21] replace Computer Graphics Group with Visual Computing Institute in html footer --- Doc/html/vci_footer.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/html/vci_footer.html b/Doc/html/vci_footer.html index d716f640..355c1ff8 100644 --- a/Doc/html/vci_footer.html +++ b/Doc/html/vci_footer.html @@ -4,7 +4,7 @@ Project $projectname, -©  Computer Graphics Group, RWTH Aachen. +©  Visual Computing Institute, RWTH Aachen. Documentation generated using doxygen From 312b155955abb06febfbeaf1f6041585b0df7654 Mon Sep 17 00:00:00 2001 From: Patrick Schmidt Date: Thu, 14 Jan 2021 18:54:50 +0100 Subject: [PATCH 16/21] Disable debug output when writing .om file --- src/OpenMesh/Core/IO/writer/OMWriter.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/OpenMesh/Core/IO/writer/OMWriter.cc b/src/OpenMesh/Core/IO/writer/OMWriter.cc index c190b2f8..1cfc0130 100644 --- a/src/OpenMesh/Core/IO/writer/OMWriter.cc +++ b/src/OpenMesh/Core/IO/writer/OMWriter.cc @@ -573,7 +573,7 @@ bool _OMWriter_::write_binary(std::ostream& _os, BaseExporter& _be, chunk_header.entity_ = OMFormat::Chunk::Entity_Sentinel; bytes += store(_os, chunk_header, swap); - std::clog << "#bytes written: " << bytes << std::endl; +// std::clog << "#bytes written: " << bytes << std::endl; return true; } From e3357d7e7746a16a7bc784946e17d315e46bec7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Fri, 15 Jan 2021 10:31:18 +0100 Subject: [PATCH 17/21] Use the paths for windows --- cmake-library | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake-library b/cmake-library index a4938523..05efd852 160000 --- a/cmake-library +++ b/cmake-library @@ -1 +1 @@ -Subproject commit a49385233272aa9a98c626c6adc5ba213ab2c811 +Subproject commit 05efd8523dbb92b34c4de77b90e55d659839ae3e From 2d968f38d6f5dd36b9392aac8435727b5728096a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Fri, 15 Jan 2021 13:52:58 +0100 Subject: [PATCH 18/21] Give CI a path to Eigen3 --- CI/Windows.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/Windows.bat b/CI/Windows.bat index 616dcf27..a31edaaa 100644 --- a/CI/Windows.bat +++ b/CI/Windows.bat @@ -107,7 +107,7 @@ IF EXIST %QT_INSTALL_PATH%\ ( ) -"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_ROOT="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DBUILD_APPS=%APPS% -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DCMAKE_WINDOWS_LIBS_DIR="e:\libs" -DOPENMESH_BUILD_SHARED=%SHARED% %CMAKE_CONFIGURATION% .. +"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_ROOT="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DCMAKE_BUILD_TYPE=Release -DBUILD_APPS=%APPS% -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DCMAKE_WINDOWS_LIBS_DIR="e:\libs" -DEigen3_DIR="e:\libs\general\Eigen3.3.9\share\eigen3\cmake" -DOPENMESH_BUILD_SHARED=%SHARED% %CMAKE_CONFIGURATION% .. %VS_PATH% /Build "Release" OpenMesh.sln /Project "ALL_BUILD" From cfe1ed2fa5b8d222e2decba0f1a0ea3574b16874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Fri, 15 Jan 2021 13:58:48 +0100 Subject: [PATCH 19/21] Add warning if Eigen is not found --- src/Unittests/CMakeLists.txt | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/Unittests/CMakeLists.txt b/src/Unittests/CMakeLists.txt index b52434e4..22595feb 100644 --- a/src/Unittests/CMakeLists.txt +++ b/src/Unittests/CMakeLists.txt @@ -30,6 +30,8 @@ if ( OPENMESH_BUILD_UNIT_TESTS ) if (TARGET Eigen3::Eigen) add_definitions( -DENABLE_EIGEN3_TEST ) link_libraries(Eigen3::Eigen) + else() + message(WARNING "Eigen3 not found! This will skip the Eigen3 Unittests. You can point cmake to Eigen3 by setting Eigen3_DIR to the cmake files of Eigen3") endif() if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" ) From 52b2be6ba862d116924512643ddf27a4cb7f55d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20M=C3=B6bius?= Date: Fri, 15 Jan 2021 14:00:09 +0100 Subject: [PATCH 20/21] Missed one --- CI/Windows.bat | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CI/Windows.bat b/CI/Windows.bat index a31edaaa..acb1e2d2 100644 --- a/CI/Windows.bat +++ b/CI/Windows.bat @@ -129,7 +129,7 @@ mkdir build-debug cd build-debug -"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_ROOT="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DCMAKE_BUILD_TYPE=Debug -DOPENMESH_BUILD_SHARED=%SHARED% -DBUILD_APPS=%APPS% %CMAKE_CONFIGURATION% .. +"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_ROOT="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DEigen3_DIR="e:\libs\general\Eigen3.3.9\share\eigen3\cmake" -DCMAKE_BUILD_TYPE=Debug -DOPENMESH_BUILD_SHARED=%SHARED% -DBUILD_APPS=%APPS% %CMAKE_CONFIGURATION% .. %VS_PATH% /Build "Debug" OpenMesh.sln /Project "ALL_BUILD" From 2fba57e12357a2e55752591634c2472718d9b6d3 Mon Sep 17 00:00:00 2001 From: Max Lyon Date: Tue, 19 Jan 2021 15:34:41 +0100 Subject: [PATCH 21/21] add method to property manager to set property persistent --- src/OpenMesh/Core/Utils/PropertyManager.hh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/OpenMesh/Core/Utils/PropertyManager.hh b/src/OpenMesh/Core/Utils/PropertyManager.hh index 62d87b76..0f167ff8 100644 --- a/src/OpenMesh/Core/Utils/PropertyManager.hh +++ b/src/OpenMesh/Core/Utils/PropertyManager.hh @@ -593,6 +593,17 @@ class PropertyManager { src.copy_to(src_range, dst, dst_range); } + /** + * Mark whether this property should be stored when mesh is written + * to a file + * + * @param _persistence Property will be stored iff _persistence is true + */ + void set_persistent(bool _persistence = true) + { + mesh().property(getRawProperty()).set_persistent(_persistence); + } + private: void deleteProperty() { if (!retain_ && prop_.is_valid())