Merge branch 'master' into remove_compile_order_check
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -3,3 +3,6 @@
|
||||
CMakeLists.txt.user
|
||||
build*
|
||||
*.swp
|
||||
.settings
|
||||
# ignore mac temporal files
|
||||
.DS_Store
|
||||
|
||||
737
.gitlab-ci.yml
737
.gitlab-ci.yml
@@ -1,50 +1,522 @@
|
||||
gcc-c++11:
|
||||
script: "CI/ci-linux.sh gcc C++11"
|
||||
tags:
|
||||
- Linux
|
||||
#############################################################
|
||||
# #
|
||||
# This is an auto generated file. Do not make #
|
||||
# changes to this file. They possible will be overriden. #
|
||||
# #
|
||||
# To make persistent changes, changes files in #
|
||||
# ./CI/gitlab-ci/ ... #
|
||||
# and regenerate this file with the configuration tool #
|
||||
# python3 ./CI/gitlab-ci/assemble-gitlab-ci.py #
|
||||
# #
|
||||
#############################################################
|
||||
|
||||
clang-c++11:
|
||||
script: "CI/ci-linux.sh clang C++11"
|
||||
tags:
|
||||
- Linux
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
|
||||
gcc-c++14:
|
||||
script: "CI/ci-linux.sh gcc C++14"
|
||||
tags:
|
||||
- Linux
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
|
||||
clang-c++14:
|
||||
script: "CI/ci-linux.sh clang C++14"
|
||||
tags:
|
||||
- Linux
|
||||
# -----------------
|
||||
# Linux tasks
|
||||
# -----------------
|
||||
|
||||
macos-c++11:
|
||||
script: "CI/ci-mac.sh C++11"
|
||||
cppcheck:
|
||||
stage: build
|
||||
script: "CI/ci-cppcheck.sh"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
timeout: 3h
|
||||
artifacts:
|
||||
paths:
|
||||
- cppcheck.log
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Build: debug
|
||||
# OS: Linux
|
||||
# Compiler: gcc
|
||||
# Language: cpp11
|
||||
|
||||
build-debug-gcc-cpp11:
|
||||
stage: build
|
||||
script: "CI/ci-linux-build.sh gcc cpp11 debug"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
artifacts:
|
||||
paths:
|
||||
- build-gcc-cpp11-debug-Vector-Checks/
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Test: debug
|
||||
# OS: Linux
|
||||
# Compiler: gcc
|
||||
# Language: cpp11
|
||||
|
||||
test-debug-gcc-cpp11:
|
||||
stage: test
|
||||
script: "CI/ci-linux-test.sh gcc cpp11 debug"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
dependencies: [build-debug-gcc-cpp11]
|
||||
needs: [build-debug-gcc-cpp11]
|
||||
artifacts:
|
||||
reports:
|
||||
junit:
|
||||
- build-gcc-cpp11-debug-Vector-Checks/Unittests/report.xml
|
||||
- build-gcc-cpp11-debug-Vector-Checks/Unittests/report-customvec.xml
|
||||
- build-gcc-cpp11-debug-Vector-Checks/Unittests/report-doublevec.xml
|
||||
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Build: release
|
||||
# OS: Linux
|
||||
# Compiler: gcc
|
||||
# Language: cpp11
|
||||
|
||||
build-release-gcc-cpp11:
|
||||
stage: build
|
||||
script: "CI/ci-linux-build.sh gcc cpp11 release"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
artifacts:
|
||||
paths:
|
||||
- build-gcc-cpp11-release-Vector-Checks/
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Test: release
|
||||
# OS: Linux
|
||||
# Compiler: gcc
|
||||
# Language: cpp11
|
||||
|
||||
test-release-gcc-cpp11:
|
||||
stage: test
|
||||
script: "CI/ci-linux-test.sh gcc cpp11 release"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
dependencies: [build-release-gcc-cpp11]
|
||||
needs: [build-release-gcc-cpp11]
|
||||
artifacts:
|
||||
reports:
|
||||
junit:
|
||||
- build-gcc-cpp11-release-Vector-Checks/Unittests/report.xml
|
||||
- build-gcc-cpp11-release-Vector-Checks/Unittests/report-customvec.xml
|
||||
- build-gcc-cpp11-release-Vector-Checks/Unittests/report-doublevec.xml
|
||||
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Build: debug
|
||||
# OS: Linux
|
||||
# Compiler: clang
|
||||
# Language: cpp11
|
||||
|
||||
build-debug-clang-cpp11:
|
||||
stage: build
|
||||
script: "CI/ci-linux-build.sh clang cpp11 debug"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
artifacts:
|
||||
paths:
|
||||
- build-clang-cpp11-debug-Vector-Checks/
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Test: debug
|
||||
# OS: Linux
|
||||
# Compiler: clang
|
||||
# Language: cpp11
|
||||
|
||||
test-debug-clang-cpp11:
|
||||
stage: test
|
||||
script: "CI/ci-linux-test.sh clang cpp11 debug"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
dependencies: [build-debug-clang-cpp11]
|
||||
needs: [build-debug-clang-cpp11]
|
||||
artifacts:
|
||||
reports:
|
||||
junit:
|
||||
- build-clang-cpp11-debug-Vector-Checks/Unittests/report.xml
|
||||
- build-clang-cpp11-debug-Vector-Checks/Unittests/report-customvec.xml
|
||||
- build-clang-cpp11-debug-Vector-Checks/Unittests/report-doublevec.xml
|
||||
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Build: release
|
||||
# OS: Linux
|
||||
# Compiler: clang
|
||||
# Language: cpp11
|
||||
|
||||
build-release-clang-cpp11:
|
||||
stage: build
|
||||
script: "CI/ci-linux-build.sh clang cpp11 release"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
artifacts:
|
||||
paths:
|
||||
- build-clang-cpp11-release-Vector-Checks/
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Test: release
|
||||
# OS: Linux
|
||||
# Compiler: clang
|
||||
# Language: cpp11
|
||||
|
||||
test-release-clang-cpp11:
|
||||
stage: test
|
||||
script: "CI/ci-linux-test.sh clang cpp11 release"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
dependencies: [build-release-clang-cpp11]
|
||||
needs: [build-release-clang-cpp11]
|
||||
artifacts:
|
||||
reports:
|
||||
junit:
|
||||
- build-clang-cpp11-release-Vector-Checks/Unittests/report.xml
|
||||
- build-clang-cpp11-release-Vector-Checks/Unittests/report-customvec.xml
|
||||
- build-clang-cpp11-release-Vector-Checks/Unittests/report-doublevec.xml
|
||||
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Build: debug
|
||||
# OS: Linux
|
||||
# Compiler: gcc
|
||||
# Language: cpp14
|
||||
|
||||
build-debug-gcc-cpp14:
|
||||
stage: build
|
||||
script: "CI/ci-linux-build.sh gcc cpp14 debug"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
artifacts:
|
||||
paths:
|
||||
- build-gcc-cpp14-debug-Vector-Checks/
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Test: debug
|
||||
# OS: Linux
|
||||
# Compiler: gcc
|
||||
# Language: cpp14
|
||||
|
||||
test-debug-gcc-cpp14:
|
||||
stage: test
|
||||
script: "CI/ci-linux-test.sh gcc cpp14 debug"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
dependencies: [build-debug-gcc-cpp14]
|
||||
needs: [build-debug-gcc-cpp14]
|
||||
artifacts:
|
||||
reports:
|
||||
junit:
|
||||
- build-gcc-cpp14-debug-Vector-Checks/Unittests/report.xml
|
||||
- build-gcc-cpp14-debug-Vector-Checks/Unittests/report-customvec.xml
|
||||
- build-gcc-cpp14-debug-Vector-Checks/Unittests/report-doublevec.xml
|
||||
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Build: release
|
||||
# OS: Linux
|
||||
# Compiler: gcc
|
||||
# Language: cpp14
|
||||
|
||||
build-release-gcc-cpp14:
|
||||
stage: build
|
||||
script: "CI/ci-linux-build.sh gcc cpp14 release"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
artifacts:
|
||||
paths:
|
||||
- build-gcc-cpp14-release-Vector-Checks/
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Test: release
|
||||
# OS: Linux
|
||||
# Compiler: gcc
|
||||
# Language: cpp14
|
||||
|
||||
test-release-gcc-cpp14:
|
||||
stage: test
|
||||
script: "CI/ci-linux-test.sh gcc cpp14 release"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
dependencies: [build-release-gcc-cpp14]
|
||||
needs: [build-release-gcc-cpp14]
|
||||
artifacts:
|
||||
reports:
|
||||
junit:
|
||||
- build-gcc-cpp14-release-Vector-Checks/Unittests/report.xml
|
||||
- build-gcc-cpp14-release-Vector-Checks/Unittests/report-customvec.xml
|
||||
- build-gcc-cpp14-release-Vector-Checks/Unittests/report-doublevec.xml
|
||||
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Build: debug
|
||||
# OS: Linux
|
||||
# Compiler: clang
|
||||
# Language: cpp14
|
||||
|
||||
build-debug-clang-cpp14:
|
||||
stage: build
|
||||
script: "CI/ci-linux-build.sh clang cpp14 debug"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
artifacts:
|
||||
paths:
|
||||
- build-clang-cpp14-debug-Vector-Checks/
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Test: debug
|
||||
# OS: Linux
|
||||
# Compiler: clang
|
||||
# Language: cpp14
|
||||
|
||||
test-debug-clang-cpp14:
|
||||
stage: test
|
||||
script: "CI/ci-linux-test.sh clang cpp14 debug"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
dependencies: [build-debug-clang-cpp14]
|
||||
needs: [build-debug-clang-cpp14]
|
||||
artifacts:
|
||||
reports:
|
||||
junit:
|
||||
- build-clang-cpp14-debug-Vector-Checks/Unittests/report.xml
|
||||
- build-clang-cpp14-debug-Vector-Checks/Unittests/report-customvec.xml
|
||||
- build-clang-cpp14-debug-Vector-Checks/Unittests/report-doublevec.xml
|
||||
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Build: release
|
||||
# OS: Linux
|
||||
# Compiler: clang
|
||||
# Language: cpp14
|
||||
|
||||
build-release-clang-cpp14:
|
||||
stage: build
|
||||
script: "CI/ci-linux-build.sh clang cpp14 release"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
artifacts:
|
||||
paths:
|
||||
- build-clang-cpp14-release-Vector-Checks/
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Test: release
|
||||
# OS: Linux
|
||||
# Compiler: clang
|
||||
# Language: cpp14
|
||||
|
||||
test-release-clang-cpp14:
|
||||
stage: test
|
||||
script: "CI/ci-linux-test.sh clang cpp14 release"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
dependencies: [build-release-clang-cpp14]
|
||||
needs: [build-release-clang-cpp14]
|
||||
artifacts:
|
||||
reports:
|
||||
junit:
|
||||
- build-clang-cpp14-release-Vector-Checks/Unittests/report.xml
|
||||
- build-clang-cpp14-release-Vector-Checks/Unittests/report-customvec.xml
|
||||
- build-clang-cpp14-release-Vector-Checks/Unittests/report-doublevec.xml
|
||||
|
||||
|
||||
|
||||
# -----------------
|
||||
# MAC tasks
|
||||
# -----------------
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Build+Test: debug
|
||||
# OS: Mac
|
||||
# Language: cpp11
|
||||
|
||||
macos-cpp11-debug:
|
||||
stage: build
|
||||
script: "CI/ci-mac-build.sh cpp11 debug ; CI/ci-mac-test.sh cpp11 debug"
|
||||
tags:
|
||||
- Apple
|
||||
artifacts:
|
||||
paths:
|
||||
- build-debug-cpp11/*.dmg
|
||||
- build-debug-cpp11/*.tar.gz
|
||||
# reports:
|
||||
# junit:
|
||||
# - build-debug-cpp11/Unittests/report.xml
|
||||
# - build-debug-cpp11/Unittests/report-customvec.xml
|
||||
# - build-debug-cpp11/Unittests/report-doublevec.xml
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Build+Test: release
|
||||
# OS: Mac
|
||||
# Language: cpp11
|
||||
|
||||
macos-cpp11-release:
|
||||
stage: build
|
||||
script: "CI/ci-mac-build.sh cpp11 release ; CI/ci-mac-test.sh cpp11 release"
|
||||
tags:
|
||||
- Apple
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release-cpp11/*.dmg
|
||||
- build-release-cpp11/*.tar.gz
|
||||
# reports:
|
||||
# junit:
|
||||
# - build-release-cpp11/Unittests/report.xml
|
||||
# - build-release-cpp11/Unittests/report-customvec.xml
|
||||
# - build-release-cpp11/Unittests/report-doublevec.xml
|
||||
|
||||
macos-c++98:
|
||||
script: "CI/ci-mac.sh C++14"
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Build+Test: debug
|
||||
# OS: Mac
|
||||
# Language: cpp14
|
||||
|
||||
macos-cpp14-debug:
|
||||
stage: build
|
||||
script: "CI/ci-mac-build.sh cpp14 debug ; CI/ci-mac-test.sh cpp14 debug"
|
||||
tags:
|
||||
- Apple
|
||||
artifacts:
|
||||
paths:
|
||||
- build-debug-cpp14/*.dmg
|
||||
- build-debug-cpp14/*.tar.gz
|
||||
# reports:
|
||||
# junit:
|
||||
# - build-debug-cpp14/Unittests/report.xml
|
||||
# - build-debug-cpp14/Unittests/report-customvec.xml
|
||||
# - build-debug-cpp14/Unittests/report-doublevec.xml
|
||||
|
||||
#----------- Job Informations:
|
||||
# Type: Build+Test: release
|
||||
# OS: Mac
|
||||
# Language: cpp14
|
||||
|
||||
macos-cpp14-release:
|
||||
stage: build
|
||||
script: "CI/ci-mac-build.sh cpp14 release ; CI/ci-mac-test.sh cpp14 release"
|
||||
tags:
|
||||
- Apple
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release-cpp14/*.dmg
|
||||
- build-release-cpp14/*.tar.gz
|
||||
# reports:
|
||||
# junit:
|
||||
# - build-release-cpp14/Unittests/report.xml
|
||||
# - build-release-cpp14/Unittests/report-customvec.xml
|
||||
# - build-release-cpp14/Unittests/report-doublevec.xml
|
||||
|
||||
cppcheck:
|
||||
script: "CI/ci-cppcheck.sh"
|
||||
|
||||
|
||||
# -----------------
|
||||
# Windows tasks
|
||||
# -----------------
|
||||
|
||||
#------------- Job Informations:
|
||||
# Type: Build+Test: Release
|
||||
# OS: Windows
|
||||
# Architecture: x64
|
||||
# Shared: TRUE
|
||||
# VS Version: VS2017
|
||||
# Apps: {{APPS}}
|
||||
|
||||
build-VS2017-x64-shared-TRUE-apps:
|
||||
stage: build
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2017"
|
||||
ARCHITECTURE: "x64"
|
||||
SHARED: "TRUE"
|
||||
APPS: "ON"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- Linux
|
||||
- VS2017
|
||||
- Qt5101
|
||||
artifacts:
|
||||
paths:
|
||||
- cppcheck.log
|
||||
- build-release/*.exe
|
||||
reports:
|
||||
junit:
|
||||
- build-release/unittests/report.xml
|
||||
- build-release/unittests/report-customvec.xml
|
||||
- build-release/unittests/report-doublevec.xml
|
||||
|
||||
VS2015-64-bit-shared-apps:
|
||||
build-VS2017-x64-shared-TRUE-no-apps:
|
||||
stage: build
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2017"
|
||||
ARCHITECTURE: "x64"
|
||||
SHARED: "TRUE"
|
||||
APPS: "OFF"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2017
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
reports:
|
||||
junit:
|
||||
- build-release/unittests/report.xml
|
||||
- build-release/unittests/report-customvec.xml
|
||||
- build-release/unittests/report-doublevec.xml
|
||||
|
||||
#------------- Job Informations:
|
||||
# Type: Build+Test: Release
|
||||
# OS: Windows
|
||||
# Architecture: x64
|
||||
# Shared: FALSE
|
||||
# VS Version: VS2017
|
||||
# Apps: {{APPS}}
|
||||
|
||||
build-VS2017-x64-shared-FALSE-apps:
|
||||
stage: build
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2017"
|
||||
ARCHITECTURE: "x64"
|
||||
SHARED: "FALSE"
|
||||
APPS: "ON"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2017
|
||||
- Qt5101
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
reports:
|
||||
junit:
|
||||
- build-release/unittests/report.xml
|
||||
- build-release/unittests/report-customvec.xml
|
||||
- build-release/unittests/report-doublevec.xml
|
||||
|
||||
build-VS2017-x64-shared-FALSE-no-apps:
|
||||
stage: build
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2017"
|
||||
ARCHITECTURE: "x64"
|
||||
SHARED: "FALSE"
|
||||
APPS: "OFF"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2017
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
reports:
|
||||
junit:
|
||||
- build-release/unittests/report.xml
|
||||
- build-release/unittests/report-customvec.xml
|
||||
- build-release/unittests/report-doublevec.xml
|
||||
|
||||
|
||||
#------------- Job Informations:
|
||||
# Type: Build+Test: Release
|
||||
# OS: Windows
|
||||
# Architecture: x64
|
||||
# Shared: TRUE
|
||||
# VS Version: VS2015
|
||||
# Apps: {{APPS}}
|
||||
|
||||
build-VS2015-x64-shared-TRUE-apps:
|
||||
stage: build
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2015"
|
||||
ARCHITECTURE: "x64"
|
||||
@@ -53,11 +525,18 @@ VS2015-64-bit-shared-apps:
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2015
|
||||
- Qt5101
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
reports:
|
||||
junit:
|
||||
- build-release/unittests/report.xml
|
||||
- build-release/unittests/report-customvec.xml
|
||||
- build-release/unittests/report-doublevec.xml
|
||||
|
||||
VS2015-64-bit-shared-no-apps:
|
||||
build-VS2015-x64-shared-TRUE-no-apps:
|
||||
stage: build
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2015"
|
||||
ARCHITECTURE: "x64"
|
||||
@@ -69,34 +548,22 @@ VS2015-64-bit-shared-no-apps:
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
reports:
|
||||
junit:
|
||||
- build-release/unittests/report.xml
|
||||
- build-release/unittests/report-customvec.xml
|
||||
- build-release/unittests/report-doublevec.xml
|
||||
|
||||
VS2015-32-bit-shared-apps:
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2015"
|
||||
ARCHITECTURE: "x32"
|
||||
SHARED: "TRUE"
|
||||
APPS: "ON"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2015
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
#------------- Job Informations:
|
||||
# Type: Build+Test: Release
|
||||
# OS: Windows
|
||||
# Architecture: x64
|
||||
# Shared: FALSE
|
||||
# VS Version: VS2015
|
||||
# Apps: {{APPS}}
|
||||
|
||||
VS2015-32-bit-shared-no-apps:
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2015"
|
||||
ARCHITECTURE: "x32"
|
||||
SHARED: "TRUE"
|
||||
APPS: "OFF"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2015
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
|
||||
VS2015-64-bit-static-apps:
|
||||
build-VS2015-x64-shared-FALSE-apps:
|
||||
stage: build
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2015"
|
||||
ARCHITECTURE: "x64"
|
||||
@@ -105,11 +572,18 @@ VS2015-64-bit-static-apps:
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2015
|
||||
- Qt5101
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
reports:
|
||||
junit:
|
||||
- build-release/unittests/report.xml
|
||||
- build-release/unittests/report-customvec.xml
|
||||
- build-release/unittests/report-doublevec.xml
|
||||
|
||||
VS2015-64-bit-static-no-apps:
|
||||
build-VS2015-x64-shared-FALSE-no-apps:
|
||||
stage: build
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2015"
|
||||
ARCHITECTURE: "x64"
|
||||
@@ -121,149 +595,34 @@ VS2015-64-bit-static-no-apps:
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
reports:
|
||||
junit:
|
||||
- build-release/unittests/report.xml
|
||||
- build-release/unittests/report-customvec.xml
|
||||
- build-release/unittests/report-doublevec.xml
|
||||
|
||||
VS2015-32-bit-static-apps:
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2015"
|
||||
ARCHITECTURE: "x32"
|
||||
SHARED: "FALSE"
|
||||
APPS: "ON"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2015
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
|
||||
VS2015-32-bit-static-no-apps:
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2015"
|
||||
ARCHITECTURE: "x32"
|
||||
SHARED: "FALSE"
|
||||
APPS: "OFF"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2015
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
|
||||
|
||||
|
||||
VS2013-64-bit-shared-apps:
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2013"
|
||||
ARCHITECTURE: "x64"
|
||||
SHARED: "TRUE"
|
||||
APPS: "ON"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2013
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
|
||||
VS2013-64-bit-shared-no-apps:
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2013"
|
||||
ARCHITECTURE: "x64"
|
||||
SHARED: "TRUE"
|
||||
APPS: "OFF"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2013
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
|
||||
VS2013-32-bit-shared-apps:
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2013"
|
||||
ARCHITECTURE: "x32"
|
||||
SHARED: "TRUE"
|
||||
APPS: "ON"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2013
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
|
||||
VS2013-32-bit-shared-no-apps:
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2013"
|
||||
ARCHITECTURE: "x32"
|
||||
SHARED: "TRUE"
|
||||
APPS: "OFF"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2013
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
|
||||
VS2013-64-bit-static-apps:
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2013"
|
||||
ARCHITECTURE: "x64"
|
||||
SHARED: "FALSE"
|
||||
APPS: "ON"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2013
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
|
||||
VS2013-64-bit-static-no-apps:
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2013"
|
||||
ARCHITECTURE: "x64"
|
||||
SHARED: "FALSE"
|
||||
APPS: "OFF"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2013
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
|
||||
VS2013-32-bit-static-apps:
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2013"
|
||||
ARCHITECTURE: "x32"
|
||||
SHARED: "FALSE"
|
||||
APPS: "ON"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2013
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
|
||||
VS2013-32-bit-static-no-apps:
|
||||
variables:
|
||||
BUILD_PLATFORM: "VS2013"
|
||||
ARCHITECTURE: "x32"
|
||||
SHARED: "FALSE"
|
||||
APPS: "OFF"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- VS2013
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
|
||||
Doc-publish:
|
||||
stage: deploy
|
||||
only:
|
||||
- master
|
||||
script: "CI/ci-doc.sh"
|
||||
tags:
|
||||
- Linux
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
- stretch
|
||||
|
||||
Sources:
|
||||
stage: deploy
|
||||
only:
|
||||
- master
|
||||
script: "CI/ci-source.sh"
|
||||
tags:
|
||||
- Linux
|
||||
- stretch
|
||||
artifacts:
|
||||
paths:
|
||||
- OpenMesh*.zip
|
||||
- OpenMesh*.tar.bz2
|
||||
- OpenMesh*.tar.gz
|
||||
|
||||
|
||||
|
||||
15
.qmake.cache
15
.qmake.cache
@@ -1,15 +0,0 @@
|
||||
unix {
|
||||
TOPDIR = $$system( pwd )/
|
||||
}
|
||||
|
||||
win32 {
|
||||
TOPDIR = $$system( cd )/
|
||||
}
|
||||
|
||||
#use next qmake.cache if it exists
|
||||
exists(../.qmake.cache) {
|
||||
include( ../.qmake.cache )
|
||||
}
|
||||
|
||||
include( qmake/all.include )
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Please look into the doxygen configuration (Generated from Doc/history.docu)
|
||||
The changelog can be found in the html Documentation.
|
||||
|
||||
The latest changelog for the master can be found here:
|
||||
http://openmesh.org/Daily-Builds/Doc/a00002.html
|
||||
http://openmesh.org/Daily-Builds/Doc/
|
||||
|
||||
116
CI/Windows.bat
116
CI/Windows.bat
@@ -16,39 +16,6 @@ IF "%SHARED%" == "TRUE" (
|
||||
set STRING_DLL=
|
||||
)
|
||||
|
||||
IF "%BUILD_PLATFORM%" == "VS2012" (
|
||||
set LIBPATH=E:\libs\VS2012
|
||||
set GTESTVERSION=gtest-1.6.0
|
||||
set GENERATOR=Visual Studio 11%ARCH_VS%
|
||||
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE\devenv.com"
|
||||
set QT_VERSION=
|
||||
IF "%ARCHITECTURE%" == "x64" (
|
||||
set QT_INSTALL_PATH=E:\Qt\4.8.5-vs2012-%STRING_ARCH%\
|
||||
set QT_BASE_CONFIG=-DQT_QMAKE_EXECUTABLE=E:\Qt\4.8.5-vs2012-%STRING_ARCH%\bin\qmake.exe
|
||||
)
|
||||
|
||||
IF "%ARCHITECTURE%" == "x32" (
|
||||
set QT_INSTALL_PATH=E:\Qt\4.8.5-vs2012-%STRING_ARCH%\
|
||||
set QT_BASE_CONFIG=-DQT_QMAKE_EXECUTABLE=E:\Qt\4.8.5-vs2012-%STRING_ARCH%\bin\qmake.exe
|
||||
)
|
||||
)
|
||||
|
||||
IF "%BUILD_PLATFORM%" == "VS2013" (
|
||||
set LIBPATH=E:\libs\VS2013
|
||||
set GTESTVERSION=gtest-1.6.0
|
||||
set GENERATOR=Visual Studio 12%ARCH_VS%
|
||||
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\devenv.com"
|
||||
set QT_VERSION=
|
||||
IF "%ARCHITECTURE%" == "x64" (
|
||||
set QT_INSTALL_PATH=E:\Qt\Qt5.3.1-vs2013-%STRING_ARCH%\5.3\msvc2013_64_opengl
|
||||
set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\Qt5.3.1-vs2013-%STRING_ARCH%\5.3\msvc2013_64_opengl
|
||||
)
|
||||
|
||||
IF "%ARCHITECTURE%" == "x32" (
|
||||
set QT_INSTALL_PATH=E:\Qt\Qt5.3.1-vs2013-%STRING_ARCH%\5.3\msvc2013_opengl
|
||||
set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\Qt5.3.1-vs2013-%STRING_ARCH%\5.3\msvc2013_opengl
|
||||
)
|
||||
)
|
||||
|
||||
IF "%BUILD_PLATFORM%" == "VS2015" (
|
||||
set LIBPATH=E:\libs\VS2015
|
||||
@@ -56,7 +23,6 @@ IF "%BUILD_PLATFORM%" == "VS2015" (
|
||||
set GENERATOR=Visual Studio 14%ARCH_VS%
|
||||
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\devenv.com"
|
||||
|
||||
set QT_VERSION=
|
||||
IF "%ARCHITECTURE%" == "x64" (
|
||||
set QT_INSTALL_PATH=E:\Qt\Qt5.6.0-vs2015-%STRING_ARCH%\5.6\msvc2015_64
|
||||
set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\Qt5.6.0-vs2015-%STRING_ARCH%\5.6\msvc2015_64
|
||||
@@ -69,31 +35,79 @@ IF "%BUILD_PLATFORM%" == "VS2015" (
|
||||
|
||||
)
|
||||
|
||||
IF "%BUILD_PLATFORM%" == "VS2017" (
|
||||
set LIBPATH=E:\libs\VS2017
|
||||
set GTESTVERSION=gtest-1.7.0
|
||||
set GENERATOR=Visual Studio 15%ARCH_VS%
|
||||
set VS_PATH="C:\Program Files (x86)\Microsoft Visual Studio\2017\Professional\Common7\IDE\devenv.com"
|
||||
|
||||
IF "%ARCHITECTURE%" == "x64" (
|
||||
set QT_INSTALL_PATH=E:\Qt\Qt5.10.1\5.10.1\msvc2017_64
|
||||
set QT_BASE_CONFIG=-DQT5_INSTALL_PATH=E:\Qt\Qt5.10.1\5.10.1\msvc2017_64
|
||||
)
|
||||
|
||||
)
|
||||
|
||||
|
||||
IF "%APPS%" == "ON" (
|
||||
set STRING_APPS=
|
||||
|
||||
ECHO "Copying Platform plugins from %QT_INSTALL_PATH%\plugins\platforms to Build\plugins\platforms"
|
||||
|
||||
|
||||
|
||||
REM Create the platform plugins subdirectory for the qt plugins required to run the gui apps
|
||||
mkdir Build
|
||||
mkdir Build\plugins
|
||||
mkdir Build\plugins\platforms
|
||||
|
||||
REM Copy the platform plugins subdirectory for the qt plugins required to run the gui apps
|
||||
xcopy /Y %QT_INSTALL_PATH%\plugins\platforms Build\plugins\platforms
|
||||
|
||||
IF "%BUILD_PLATFORM%" == "VS2015" (
|
||||
set CMAKE_CONFIGURATION=%QT_BASE_CONFIG% -DGLUT_INCLUDE_DIR="%LIBPATH%\%ARCHITECTURE%\freeglut-3.0.0\include" -DGLUT_glut_LIBRARY="%LIBPATH%\%ARCHITECTURE%\freeglut-3.0.0\lib\freeglut.lib"
|
||||
|
||||
|
||||
) ELSE (
|
||||
set CMAKE_CONFIGURATION=%QT_BASE_CONFIG% -DGLUT_INCLUDE_DIR="%LIBPATH%\%ARCHITECTURE%\freeglut-2.8.1\include" -DGLUT_glut_LIBRARY="%LIBPATH%\%ARCHITECTURE%\freeglut-2.8.1\lib\freeglut.lib"
|
||||
)
|
||||
set CMAKE_CONFIGURATION=%QT_BASE_CONFIG%
|
||||
) ELSE (
|
||||
set STRING_APPS=-no-apps
|
||||
set CMAKE_CONFIGURATION=
|
||||
)
|
||||
|
||||
|
||||
"C:\Program Files (x86)\CMake\bin\cmake.exe" -DGTEST_PREFIX="%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% ..
|
||||
|
||||
|
||||
ECHO "============================================================="
|
||||
ECHO "============================================================="
|
||||
ECHO "Building with :"
|
||||
whoami
|
||||
ECHO "ARCHITECTURE : %ARCHITECTURE%"
|
||||
ECHO "BUILD_PLATFORM : %BUILD_PLATFORM%"
|
||||
ECHO "GTESTVERSION : %GTESTVERSION%"
|
||||
ECHO "GENERATOR : %GENERATOR%"
|
||||
ECHO "VS_PATH : %VS_PATH%"
|
||||
ECHO "LIBPATH : %LIBPATH%"
|
||||
ECHO "APPS : %APPS%"
|
||||
ECHO "SHARED : %SHARED%"
|
||||
ECHO "QT_INSTALL_PATH : %QT_INSTALL_PATH%"
|
||||
ECHO "CMAKE_CONFIGURATION : %CMAKE_CONFIGURATION%"
|
||||
ECHO "============================================================="
|
||||
ECHO "============================================================="
|
||||
ECHO ""
|
||||
ECHO "Running Build environment checks"
|
||||
|
||||
IF EXIST %LIBPATH%\ (
|
||||
ECHO "LIBPATH ... Ok"
|
||||
) ELSE (
|
||||
ECHO "LIBPATH not found!"
|
||||
exit 10;
|
||||
)
|
||||
|
||||
|
||||
IF EXIST %QT_INSTALL_PATH%\ (
|
||||
ECHO "QT_INSTALL_PATH ... Ok"
|
||||
) ELSE (
|
||||
ECHO "QT_INSTALL_PATH: %QT_INSTALL_PATH%\ not found!"
|
||||
exit 10;
|
||||
)
|
||||
|
||||
|
||||
"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% ..
|
||||
|
||||
%VS_PATH% /Build "Release" OpenMesh.sln /Project "ALL_BUILD"
|
||||
|
||||
@@ -101,7 +115,11 @@ IF %errorlevel% NEQ 0 exit /b %errorlevel%
|
||||
|
||||
cd unittests
|
||||
|
||||
unittests.exe --gtest_output=xml
|
||||
unittests.exe --gtest_output=xml:./report.xml
|
||||
|
||||
unittests_customvec.exe --gtest_output=xml:./report-customvec.xml
|
||||
|
||||
unittests_doublevec.exe --gtest_output=xml:./report-doublevec.xml
|
||||
|
||||
cd ..
|
||||
|
||||
@@ -111,7 +129,7 @@ mkdir build-debug
|
||||
|
||||
cd build-debug
|
||||
|
||||
"C:\Program Files (x86)\CMake\bin\cmake.exe" -DGTEST_PREFIX="%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 -DCMAKE_BUILD_TYPE=Debug -DOPENMESH_BUILD_SHARED=%SHARED% -DBUILD_APPS=%APPS% %CMAKE_CONFIGURATION% ..
|
||||
|
||||
%VS_PATH% /Build "Debug" OpenMesh.sln /Project "ALL_BUILD"
|
||||
|
||||
@@ -129,6 +147,10 @@ cd unittests
|
||||
|
||||
unittests.exe --gtest_output=xml
|
||||
|
||||
unittests_customvec.exe --gtest_output=xml
|
||||
|
||||
unittests_doublevec.exe --gtest_output=xml
|
||||
|
||||
IF %errorlevel% NEQ 0 exit /b %errorlevel%
|
||||
|
||||
cd ..
|
||||
@@ -139,13 +161,13 @@ cd build-release
|
||||
|
||||
del *.exe
|
||||
|
||||
"C:\Program Files (x86)\CMake\bin\cmake.exe" -DGTEST_PREFIX="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DBUILD_APPS=%APPS% -DCMAKE_BUILD_TYPE=Release %CMAKE_CONFIGURATION% ..
|
||||
"C:\Program Files\CMake\bin\cmake.exe" -DGTEST_ROOT="%LIBPATH%\%ARCHITECTURE%\%GTESTVERSION%" -G "%GENERATOR%" -DBUILD_APPS=%APPS% -DCMAKE_BUILD_TYPE=Release %CMAKE_CONFIGURATION% ..
|
||||
|
||||
%VS_PATH% /Build "Release" OpenMesh.sln /Project "PACKAGE"
|
||||
|
||||
IF %errorlevel% NEQ 0 exit /b %errorlevel%
|
||||
|
||||
move OpenMesh-*.exe "OpenMesh-7.0-Git-Master-%CI_BUILD_REF%-%BUILD_PLATFORM%-%STRING_ARCH%%STRING_DLL%%STRING_APPS%.exe"
|
||||
move OpenMesh-*.exe "OpenMesh-9.0-Git-Master-%CI_BUILD_REF%-%BUILD_PLATFORM%-%STRING_ARCH%%STRING_DLL%%STRING_APPS%.exe"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
# Exit script on any error
|
||||
set -e
|
||||
|
||||
CPU_COUNT=$(grep -c processor /proc/cpuinfo)
|
||||
|
||||
#=====================================
|
||||
# Color Settings:
|
||||
#=====================================
|
||||
@@ -13,22 +15,14 @@ WARNING='\033[0;93m'
|
||||
echo -e "${OUTPUT}"
|
||||
echo "=============================================================================="
|
||||
echo "Running cppcheck"
|
||||
echo -n "Version: "
|
||||
cppcheck --version
|
||||
echo "=============================================================================="
|
||||
echo -e "${NC}"
|
||||
echo "Please Wait ..."
|
||||
|
||||
# Run cppcheck and output into file
|
||||
cppcheck --enable=all . -I src -i Doc/ --force --suppress=unusedFunction --suppress=missingIncludeSystem --quiet -Umin -Umax -UBMPOSTFIX -DOPENMESHDLLEXPORT="" &> cppcheck.log
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo "=============================================================================="
|
||||
echo "CPPCHECK Messages"
|
||||
echo "=============================================================================="
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
# Echo output to command line for simple analysis via gitlab
|
||||
cat cppcheck.log
|
||||
cppcheck --enable=all . -I src -i Doc/ -i src/Unittests --force --suppress=unusedFunction -UCTIME --suppress=missingIncludeSystem --inline-suppr --quiet -Umin -Umax -DOPENMESHDLLEXPORT="" -UPRIVATE_NODE_TYPESYSTEM_SOURCE -USO_NODE_ABSTRACT_SOURCE -USO_NODE_SOURCE -UCLOCK_REALTIME_HR -i src/OpenMesh/Apps/Unsupported/ 2>&1 | tee cppcheck.log
|
||||
|
||||
COUNT=$(wc -l < cppcheck.log )
|
||||
|
||||
@@ -38,7 +32,7 @@ echo "CPPCHECK Summary"
|
||||
echo "=============================================================================="
|
||||
echo -e "${NC}"
|
||||
|
||||
MAX_COUNT=6
|
||||
MAX_COUNT=23
|
||||
|
||||
if [ $COUNT -gt $MAX_COUNT ]; then
|
||||
echo -e ${WARNING}
|
||||
|
||||
@@ -11,4 +11,4 @@ cmake -DCMAKE_BUILD_TYPE=Release -DOPENMESH_BUILD_UNIT_TESTS=FALSE ../
|
||||
make doc
|
||||
|
||||
# Copy to webserver
|
||||
scp -r -P 2222 Build/share/OpenMesh/Doc/html/* hudson@web4-info8:OpenMesh-Daily/Doc/
|
||||
scp -r -P 2222 Build/share/OpenMesh/Doc/html/* gitlab@web4-info8:OpenMesh-Daily/Doc/
|
||||
|
||||
37
CI/ci-linux-build.sh
Executable file
37
CI/ci-linux-build.sh
Executable file
@@ -0,0 +1,37 @@
|
||||
#!/bin/bash
|
||||
source CI/ci-linux-prepare.sh
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Basic configuration details:"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
echo "Compiler: $COMPILER"
|
||||
echo "Options: $OPTIONS"
|
||||
echo "Language: $LANGUAGE"
|
||||
echo "Make Options: $OPTIONS"
|
||||
echo "BuildPath: $BUILDPATH"
|
||||
echo "Path: $PATH"
|
||||
echo "Language: $LANGUAGE"
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building $BUILD_TYPE version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
if [ ! -d build-$BUILDPATH-Vector-Checks ]; then
|
||||
mkdir build-$BUILDPATH-Vector-Checks
|
||||
fi
|
||||
|
||||
cd build-$BUILDPATH-Vector-Checks
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make $MAKE_OPTIONS
|
||||
|
||||
cd ..
|
||||
59
CI/ci-linux-prepare.sh
Executable file
59
CI/ci-linux-prepare.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
|
||||
COMPILER=$1
|
||||
LANGUAGE=$2
|
||||
BUILD_TYPE=$3
|
||||
|
||||
# Exit script on any error
|
||||
set -e
|
||||
|
||||
OPTIONS=""
|
||||
MAKE_OPTIONS=""
|
||||
BUILDPATH=""
|
||||
|
||||
# set GTEST path
|
||||
OPTIONS="-DGTEST_ROOT=/usr/src/gtest/"
|
||||
|
||||
if [ "$COMPILER" == "gcc" ]; then
|
||||
echo "Building with GCC";
|
||||
BUILDPATH="gcc"
|
||||
|
||||
# without icecc: no options required
|
||||
OPTIONS="$OPTIONS -DCMAKE_CXX_COMPILER=/usr/bin/g++ -DCMAKE_C_COMPILER=/usr/bin/gcc"
|
||||
MAKE_OPTIONS="-j16"
|
||||
export ICECC_CXX=/usr/bin/g++ ; export ICECC_CC=/usr/bin/gcc
|
||||
|
||||
elif [ "$COMPILER" == "clang" ]; then
|
||||
|
||||
OPTIONS="$OPTIONS -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang"
|
||||
echo "Building with CLANG";
|
||||
BUILDPATH="clang"
|
||||
fi
|
||||
|
||||
if [ "$LANGUAGE" == "cpp98" ]; then
|
||||
echo "Building with C++98";
|
||||
BUILDPATH="$BUILDPATH-cpp98"
|
||||
elif [ "$LANGUAGE" == "cpp11" ]; then
|
||||
echo "Building with C++11";
|
||||
OPTIONS="$OPTIONS -DCMAKE_CXX_FLAGS='-std=c++11' "
|
||||
BUILDPATH="$BUILDPATH-cpp11"
|
||||
elif [ "$LANGUAGE" == "cpp14" ]; then
|
||||
echo "Building with C++14";
|
||||
OPTIONS="$OPTIONS -DCMAKE_CXX_FLAGS='-std=c++14' "
|
||||
BUILDPATH="$BUILDPATH-cpp14"
|
||||
fi
|
||||
|
||||
#=====================================
|
||||
# Color Settings:
|
||||
#=====================================
|
||||
NC='\033[0m'
|
||||
OUTPUT='\033[0;32m'
|
||||
WARNING='\033[0;93m'
|
||||
|
||||
if [ "$BUILD_TYPE" == "release" ]; then
|
||||
export BUILD_TYPE=release
|
||||
BUILDPATH="$BUILDPATH-release"
|
||||
else
|
||||
export BUILD_TYPE=debug
|
||||
BUILDPATH="$BUILDPATH-debug"
|
||||
fi
|
||||
70
CI/ci-linux-test.sh
Executable file
70
CI/ci-linux-test.sh
Executable file
@@ -0,0 +1,70 @@
|
||||
#!/bin/bash
|
||||
source CI/ci-linux-prepare.sh
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Basic configuration details:"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
echo "Compiler: $COMPILER"
|
||||
echo "Options: $OPTIONS"
|
||||
echo "Language: $LANGUAGE"
|
||||
echo "Make Options: $OPTIONS"
|
||||
echo "BuildPath: $BUILDPATH"
|
||||
echo "Path: $PATH"
|
||||
echo "Language: $LANGUAGE"
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building $BUILD_TYPE version unittests"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
if [ ! -d build-$BUILDPATH-Vector-Checks ]; then
|
||||
mkdir build-$BUILDPATH-Vector-Checks
|
||||
fi
|
||||
|
||||
cd build-$BUILDPATH-Vector-Checks
|
||||
|
||||
#build the unit tests
|
||||
make $MAKE_OPTIONS unittests
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running unittests $BUILD_TYPE version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
cd Unittests
|
||||
|
||||
#execute tests
|
||||
./unittests --gtest_color=yes --gtest_output=xml:./report.xml
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running unittests $BUILD_TYPE version with custom vector type"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
./unittests_customvec --gtest_color=yes --gtest_output=xml:./report-customvec.xml
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running unittests $BUILD_TYPE version with double vector type"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
#execute tests
|
||||
./unittests_doublevec --gtest_color=yes --gtest_output=xml:./report-doublevec.xml
|
||||
|
||||
pwd
|
||||
ls *.xml
|
||||
|
||||
cd ..
|
||||
cd ..
|
||||
222
CI/ci-linux.sh
222
CI/ci-linux.sh
@@ -1,222 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
COMPILER=$1
|
||||
LANGUAGE=$2
|
||||
|
||||
# Exit script on any error
|
||||
set -e
|
||||
|
||||
OPTIONS=""
|
||||
MAKE_OPTIONS=""
|
||||
BUILDPATH=""
|
||||
|
||||
if [ "$COMPILER" == "gcc" ]; then
|
||||
echo "Building with GCC";
|
||||
BUILDPATH="gcc"
|
||||
|
||||
# without icecc: no options required
|
||||
OPTIONS="-DCMAKE_CXX_COMPILER=/usr/lib/icecc/bin/g++ -DCMAKE_C_COMPILER=/usr/lib/icecc/bin/gcc"
|
||||
MAKE_OPTIONS="-j16"
|
||||
export ICECC_CXX=/usr/bin/g++ ; export ICECC_CC=/usr/bin/gcc
|
||||
|
||||
elif [ "$COMPILER" == "clang" ]; then
|
||||
|
||||
OPTIONS="$OPTIONS -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang"
|
||||
echo "Building with CLANG";
|
||||
BUILDPATH="clang"
|
||||
fi
|
||||
|
||||
if [ "$LANGUAGE" == "C++98" ]; then
|
||||
echo "Building with C++98";
|
||||
BUILDPATH="$BUILDPATH-cpp98"
|
||||
elif [ "$LANGUAGE" == "C++11" ]; then
|
||||
echo "Building with C++11";
|
||||
OPTIONS="$OPTIONS -DCMAKE_CXX_FLAGS='-std=c++11' "
|
||||
BUILDPATH="$BUILDPATH-cpp11"
|
||||
elif [ "$LANGUAGE" == "C++14" ]; then
|
||||
echo "Building with C++14";
|
||||
OPTIONS="$OPTIONS -DCMAKE_CXX_FLAGS='-std=c++14' "
|
||||
BUILDPATH="$BUILDPATH-cpp14"
|
||||
fi
|
||||
|
||||
#=====================================
|
||||
# Color Settings:
|
||||
#=====================================
|
||||
NC='\033[0m'
|
||||
OUTPUT='\033[0;32m'
|
||||
WARNING='\033[0;93m'
|
||||
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Basic configuration details:"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
echo "Compiler: $COMPILER"
|
||||
echo "Options: $OPTIONS"
|
||||
echo "Language: $LANGUAGE"
|
||||
echo "Make Options: $OPTIONS"
|
||||
echo "BuildPath: $BUILDPATH"
|
||||
echo "Path: $PATH"
|
||||
echo "Language: $LANGUAGE"
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Release version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
if [ ! -d build-release-$BUILDPATH-Vector-Checks ]; then
|
||||
mkdir build-release-$BUILDPATH-Vector-Checks
|
||||
fi
|
||||
|
||||
cd build-release-$BUILDPATH-Vector-Checks
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON -DOPENMESH_BUILD_PYTHON_BINDINGS=OFF $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make $MAKE_OPTIONS
|
||||
|
||||
#build the unit tests
|
||||
make $MAKE_OPTIONS unittests
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running unittests Release version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
cd Unittests
|
||||
|
||||
#execute tests
|
||||
./unittests --gtest_color=yes --gtest_output=xml
|
||||
|
||||
cd ..
|
||||
cd ..
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Release version with vectorchecks disabled for python tests"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
if [ ! -d build-release-$BUILDPATH ]; then
|
||||
mkdir build-release-$BUILDPATH
|
||||
fi
|
||||
|
||||
cd build-release-$BUILDPATH
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=ON -DBUILD_APPS=OFF $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make $MAKE_OPTIONS
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running Python unittests Release version "
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
if [ "$LANGUAGE" == "C++11" ] || [ "$COMPILER" == "gcc" ] ; then
|
||||
|
||||
# Execute Python unittests
|
||||
cd Python-Unittests
|
||||
|
||||
python -m unittest discover -v
|
||||
|
||||
cd ..
|
||||
|
||||
else
|
||||
echo -e "${WARNING}"
|
||||
echo "WARNING! Python unittests disabled !!"
|
||||
echo -e "${NC}"
|
||||
fi
|
||||
|
||||
|
||||
cd ..
|
||||
|
||||
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Debug version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
if [ ! -d build-debug-$BUILDPATH-Vector-Checks ]; then
|
||||
mkdir build-debug-$BUILDPATH-Vector-Checks
|
||||
fi
|
||||
|
||||
cd build-debug-$BUILDPATH-Vector-Checks
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON -DOPENMESH_BUILD_PYTHON_BINDINGS=OFF $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make $MAKE_OPTIONS
|
||||
|
||||
#build the unit tests
|
||||
make $MAKE_OPTIONS unittests
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running unittests Debug version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
cd Unittests
|
||||
|
||||
#execute tests
|
||||
./unittests --gtest_color=yes --gtest_output=xml
|
||||
|
||||
cd ..
|
||||
cd ..
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Debug version with vectorchecks disabled for python tests"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
if [ ! -d build-debug-$BUILDPATH ]; then
|
||||
mkdir build-debug-$BUILDPATH
|
||||
fi
|
||||
|
||||
cd build-debug-$BUILDPATH
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=DEBUG -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=ON -DBUILD_APPS=OFF $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make $MAKE_OPTIONS
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running Python unittests Debug version "
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
if [ "$LANGUAGE" == "C++11" ] || [ "$COMPILER" == "gcc" ] ; then
|
||||
|
||||
# Execute Python unittests
|
||||
cd Python-Unittests
|
||||
|
||||
python -m unittest discover -v
|
||||
else
|
||||
|
||||
echo -e "${WARNING}"
|
||||
echo "WARNING! Python unittests disabled !!"
|
||||
echo -e "${NC}"
|
||||
|
||||
fi
|
||||
63
CI/ci-mac-build.sh
Executable file
63
CI/ci-mac-build.sh
Executable file
@@ -0,0 +1,63 @@
|
||||
#!/bin/bash
|
||||
source CI/ci-mac-prepare.sh
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Basic configuration details:"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
echo "Options: $OPTIONS"
|
||||
echo "BuildPath: $BUILDPATH"
|
||||
echo "Path: $PATH"
|
||||
echo "Language: $LANGUAGE"
|
||||
|
||||
cmake --version
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building $BUILD_TYPE version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
if [ ! -d build-$BUILD_TYPE_L-$BUILDPATH-Vector-Checks ]; then
|
||||
mkdir build-$BUILD_TYPE_L-$BUILDPATH-Vector-Checks
|
||||
fi
|
||||
|
||||
cd build-$BUILD_TYPE_L-$BUILDPATH-Vector-Checks
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make
|
||||
|
||||
cd ..
|
||||
|
||||
if [ "$BUILD_TYPE_L" == "release" ]; then
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Package creation (DMG and tarball)"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
if [ ! -d build-release-$BUILDPATH ]; then
|
||||
mkdir build-release-$BUILDPATH
|
||||
fi
|
||||
|
||||
cd build-release-$BUILDPATH
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DBUILD_APPS=OFF -DCPACK_BINARY_DRAGNDROP=ON $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make
|
||||
make package
|
||||
|
||||
cd ..
|
||||
|
||||
fi
|
||||
43
CI/ci-mac-prepare.sh
Executable file
43
CI/ci-mac-prepare.sh
Executable file
@@ -0,0 +1,43 @@
|
||||
#!/bin/bash
|
||||
|
||||
#Exit on any error
|
||||
set -e
|
||||
|
||||
LANGUAGE=$1
|
||||
BUILD_TYPE=$2
|
||||
|
||||
PATH=$PATH:/opt/local/bin
|
||||
export PATH
|
||||
|
||||
OPTIONS=""
|
||||
|
||||
# set GTEST path
|
||||
OPTIONS="$OPTIONS -DGTEST_ROOT=~/sw/gtest-1.7.0/"
|
||||
|
||||
if [ "$LANGUAGE" == "cpp98" ]; then
|
||||
echo "Building with C++98";
|
||||
BUILDPATH="cpp98"
|
||||
elif [ "$LANGUAGE" == "cpp11" ]; then
|
||||
echo "Building with C++11";
|
||||
OPTIONS="$OPTIONS -DCMAKE_CXX_FLAGS='-std=c++11' "
|
||||
BUILDPATH="cpp11"
|
||||
elif [ "$LANGUAGE" == "cpp14" ]; then
|
||||
echo "Building with C++14";
|
||||
OPTIONS="$OPTIONS -DCMAKE_CXX_FLAGS='-std=c++14' "
|
||||
BUILDPATH="cpp14"
|
||||
fi
|
||||
|
||||
#=====================================
|
||||
# Color Settings:
|
||||
#=====================================
|
||||
NC='\033[0m'
|
||||
OUTPUT='\033[0;32m'
|
||||
WARNING='\033[0;93m'
|
||||
|
||||
if [ "$BUILD_TYPE" == "release" ]; then
|
||||
export BUILD_TYPE=Release
|
||||
export BUILD_TYPE_L=release
|
||||
else
|
||||
export BUILD_TYPE=Debug
|
||||
export BUILD_TYPE_L=debug
|
||||
fi
|
||||
65
CI/ci-mac-test.sh
Executable file
65
CI/ci-mac-test.sh
Executable file
@@ -0,0 +1,65 @@
|
||||
#!/bin/bash
|
||||
source CI/ci-mac-prepare.sh
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Basic configuration details:"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
echo "Options: $OPTIONS"
|
||||
echo "BuildPath: $BUILDPATH"
|
||||
echo "Path: $PATH"
|
||||
echo "Language: $LANGUAGE"
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building $BUILD_TYPE version unittests"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
if [ ! -d build-$BUILD_TYPE_L-$BUILDPATH-Vector-Checks ]; then
|
||||
mkdir build-$BUILD_TYPE_L-$BUILDPATH-Vector-Checks
|
||||
fi
|
||||
|
||||
cd build-$BUILD_TYPE_L-$BUILDPATH-Vector-Checks
|
||||
|
||||
#build the unit tests
|
||||
make unittests
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running unittests $BUILD_TYPE version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
cd Unittests
|
||||
|
||||
#execute tests
|
||||
./unittests --gtest_color=yes --gtest_output=xml:./report.xml
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running unittests $BUILD_TYPE version with minimal vector type"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
./unittests_customvec --gtest_color=yes --gtest_output=xml:./report-customvec.xml
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running unittests $BUILD_TYPE version with double vector type"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
#execute tests
|
||||
./unittests_doublevec --gtest_color=yes --gtest_output=xml:./report-doublevec.xml
|
||||
|
||||
cd ..
|
||||
cd ..
|
||||
228
CI/ci-mac.sh
228
CI/ci-mac.sh
@@ -1,228 +0,0 @@
|
||||
#!/bin/bash
|
||||
|
||||
#Exit on any error
|
||||
set -e
|
||||
|
||||
LANGUAGE=$1
|
||||
|
||||
|
||||
PATH=$PATH:/opt/local/bin
|
||||
export PATH
|
||||
|
||||
OPTIONS=""
|
||||
|
||||
if [ "$LANGUAGE" == "C++98" ]; then
|
||||
echo "Building with C++98";
|
||||
BUILDPATH="cpp98"
|
||||
elif [ "$LANGUAGE" == "C++11" ]; then
|
||||
echo "Building with C++11";
|
||||
OPTIONS="$OPTIONS -DCMAKE_CXX_FLAGS='-std=c++11' "
|
||||
BUILDPATH="cpp11"
|
||||
elif [ "$LANGUAGE" == "C++14" ]; then
|
||||
echo "Building with C++14";
|
||||
OPTIONS="$OPTIONS -DCMAKE_CXX_FLAGS='-std=c++14' "
|
||||
BUILDPATH="cpp14"
|
||||
fi
|
||||
|
||||
#=====================================
|
||||
# Color Settings:
|
||||
#=====================================
|
||||
NC='\033[0m'
|
||||
OUTPUT='\033[0;32m'
|
||||
WARNING='\033[0;93m'
|
||||
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Basic configuration details:"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
echo "Options: $OPTIONS"
|
||||
echo "BuildPath: $BUILDPATH"
|
||||
echo "Path: $PATH"
|
||||
echo "Language: $LANGUAGE"
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Release version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
if [ ! -d build-release-$BUILDPATH-Vector-Checks ]; then
|
||||
mkdir build-release-$BUILDPATH-Vector-Checks
|
||||
fi
|
||||
|
||||
cd build-release-$BUILDPATH-Vector-Checks
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=OFF $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make
|
||||
|
||||
#build the unit tests
|
||||
make unittests
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running unittests Release version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
cd Unittests
|
||||
|
||||
#execute tests
|
||||
./unittests --gtest_color=yes --gtest_output=xml
|
||||
|
||||
cd ..
|
||||
cd ..
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Release version with vectorchecks disabled for python tests"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
if [ ! -d build-release-$BUILDPATH ]; then
|
||||
mkdir build-release-$BUILDPATH
|
||||
fi
|
||||
|
||||
cd build-release-$BUILDPATH
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Release -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=ON -DBUILD_APPS=OFF -DCPACK_BINARY_DRAGNDROP=ON $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running Python unittests Release version "
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
if [ "$LANGUAGE" == "C++11" ]; then
|
||||
|
||||
# Execute Python unittests
|
||||
cd Python-Unittests
|
||||
|
||||
rm -f openmesh.so
|
||||
cp ../Build/python/openmesh.so .
|
||||
python -m unittest discover -v
|
||||
|
||||
cd ..
|
||||
|
||||
else
|
||||
echo -e "${WARNING}"
|
||||
echo "WARNING! Python unittests disabled for clang on Mac with c++98 !!"
|
||||
echo -e "${NC}"
|
||||
fi
|
||||
|
||||
cd ..
|
||||
|
||||
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Debug version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
if [ ! -d build-debug-$BUILDPATH-Vector-Checks ]; then
|
||||
mkdir build-debug-$BUILDPATH-Vector-Checks
|
||||
fi
|
||||
|
||||
cd build-debug-$BUILDPATH-Vector-Checks
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=Debug -DOPENMESH_BUILD_UNIT_TESTS=TRUE -DSTL_VECTOR_CHECKS=ON -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=OFF $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make
|
||||
|
||||
#build the unit tests
|
||||
make unittests
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running unittests Debug version with vectorchecks enabled"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
|
||||
cd Unittests
|
||||
|
||||
#execute tests
|
||||
./unittests --gtest_color=yes --gtest_output=xml
|
||||
|
||||
cd ..
|
||||
cd ..
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Building Debug version with vectorchecks disabled for python tests"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
if [ ! -d build-debug-$BUILDPATH ]; then
|
||||
mkdir build-debug-$BUILDPATH
|
||||
fi
|
||||
|
||||
cd build-debug-$BUILDPATH
|
||||
|
||||
cmake -DCMAKE_BUILD_TYPE=DEBUG -DOPENMESH_BUILD_PYTHON_UNIT_TESTS=ON -DBUILD_APPS=OFF $OPTIONS ../
|
||||
|
||||
#build it
|
||||
make
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Running Python unittests Debug version "
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
if [ "$LANGUAGE" == "C++11" ]; then
|
||||
|
||||
# Execute Python unittests
|
||||
cd Python-Unittests
|
||||
|
||||
rm -f openmesh.so
|
||||
cp ../Build/python/openmesh.so .
|
||||
python -m unittest discover -v
|
||||
|
||||
cd ..
|
||||
|
||||
else
|
||||
|
||||
echo -e "${WARNING}"
|
||||
echo "WARNING! Python unittests disabled for clang on Mac with c++98 !!"
|
||||
echo -e "${NC}"
|
||||
|
||||
fi
|
||||
|
||||
cd ..
|
||||
|
||||
echo -e "${OUTPUT}"
|
||||
echo ""
|
||||
echo "======================================================================"
|
||||
echo "Package creation (DMG and tarball)"
|
||||
echo "======================================================================"
|
||||
echo -e "${NC}"
|
||||
|
||||
cd build-release-$BUILDPATH
|
||||
cp ../build-debug-$BUILDPATH/Build/lib/* ./Build/lib/
|
||||
cmake .
|
||||
make package
|
||||
|
||||
|
||||
|
||||
35
CI/ci-source.sh
Executable file
35
CI/ci-source.sh
Executable file
@@ -0,0 +1,35 @@
|
||||
|
||||
# This script just creates compressed files of OpenMesh sources
|
||||
|
||||
# Create Build directory and Build documentation
|
||||
mkdir build-doc
|
||||
|
||||
cd build-doc
|
||||
cmake ..
|
||||
make doc
|
||||
cd ..
|
||||
|
||||
# Extract Version Information
|
||||
VERSION=OpenMesh-$(cat VERSION | grep VERSION | tr -d "VERSION=")
|
||||
|
||||
# Create Publishing directory
|
||||
mkdir $VERSION
|
||||
|
||||
# Move all files into Publishing directory
|
||||
mv CHANGELOG.md $VERSION/
|
||||
mv cmake $VERSION/
|
||||
mv CMakeLists.txt $VERSION/
|
||||
mv debian $VERSION/
|
||||
mv Doc $VERSION/
|
||||
mv LICENSE $VERSION/
|
||||
mv README.md $VERSION/
|
||||
mv src $VERSION/
|
||||
mv VERSION $VERSION/
|
||||
mv openmesh.pc.in $VERSION/
|
||||
|
||||
mv build-doc/Build/share/OpenMesh/Doc/html/ $VERSION/Documentation
|
||||
|
||||
tar cjf $VERSION.tar.bz2 $VERSION
|
||||
tar czf $VERSION.tar.gz $VERSION
|
||||
zip -9 -q -r $VERSION.zip $VERSION
|
||||
|
||||
176
CI/gitlab-ci/assemble-gitlab-ci.py
Executable file
176
CI/gitlab-ci/assemble-gitlab-ci.py
Executable file
@@ -0,0 +1,176 @@
|
||||
#!/usr/bin/python3
|
||||
|
||||
import sys, os, re, yaml, hashlib
|
||||
|
||||
# Version 3.2
|
||||
|
||||
# Script for automated gitlab-ci creation
|
||||
# Assembles the gitlab ci from master template file:
|
||||
master_file = 'ci-master.yml'
|
||||
# Lines in the master file are copied to the resulting
|
||||
# assemblied gitlab ci file
|
||||
target_file = '../../.gitlab-ci.yml'
|
||||
# Lines that are {xxx} Strings are interpreted
|
||||
# as import statement. Therefore the file xxx is imported
|
||||
# into that line.
|
||||
# Lines that are {xxx,option1=...,option2=...} includes
|
||||
# the file xxx but replaces {{option1}} etc with specified
|
||||
# string.
|
||||
error_on_path_redirection = True
|
||||
# Notice that xxx can not contain path redirections
|
||||
# like .. and /
|
||||
|
||||
# Max import recursion
|
||||
maxFileRecursionDepth = 4
|
||||
# Max filename used for pretty print
|
||||
maxFilnameChars = 30
|
||||
|
||||
|
||||
# Prefix to prepend to master file
|
||||
autogenerated_notice = """#############################################################
|
||||
# #
|
||||
# This is an auto generated file. Do not make #
|
||||
# changes to this file. They possible will be overriden. #
|
||||
# #
|
||||
# To make persistent changes, changes files in #
|
||||
# ./CI/gitlab-ci/ ... #
|
||||
# and regenerate this file with the configuration tool #
|
||||
# python3 ./CI/gitlab-ci/assemble-gitlab-ci.py #
|
||||
# #
|
||||
#############################################################
|
||||
|
||||
"""
|
||||
|
||||
|
||||
# Checks if an import filename is valid - free of path redirections
|
||||
def isValidImportFilename(filenameToImport):
|
||||
if not error_on_path_redirection:
|
||||
return True
|
||||
else:
|
||||
filterRegex = r"(\/|\\|\.\.+)"
|
||||
filtered = re.sub(filterRegex, '', filenameToImport)
|
||||
return filenameToImport == filtered
|
||||
|
||||
# Returns the directory to work on
|
||||
def findCIAssemblyDirectory():
|
||||
pathname = os.path.dirname(sys.argv[0])
|
||||
return os.path.abspath(pathname)
|
||||
|
||||
# Returns file content as string
|
||||
def readFile(filename):
|
||||
file = open(filename, "r")
|
||||
content = file.read()
|
||||
file.close()
|
||||
return content
|
||||
|
||||
# Parse File Import String for variable replacements
|
||||
def fetchVariableReplacers(variablesGrep):
|
||||
if (variablesGrep == None):
|
||||
return {}
|
||||
|
||||
regex_option = r"([^\}\n\=,]+)\=([^\}\n\=,]+)"
|
||||
pattern = re.compile(regex_option, flags=re.MULTILINE)
|
||||
result = {}
|
||||
|
||||
for (key, value) in re.findall(pattern, variablesGrep):
|
||||
|
||||
if (key != None and value != None):
|
||||
key = key.strip()
|
||||
result[key] = value
|
||||
|
||||
return result
|
||||
|
||||
|
||||
# Assembles the file in memory and returns file content as string
|
||||
def assembleTarget(master, depth=maxFileRecursionDepth):
|
||||
if depth < 0:
|
||||
raise "Max depth reached. Possible circular import?"
|
||||
print_prefix = ""
|
||||
for _ in range(0, maxFileRecursionDepth-depth):
|
||||
print_prefix = print_prefix + " | \t"
|
||||
print_prefix_inverse = ""
|
||||
for _ in range(0, depth):
|
||||
print_prefix_inverse = print_prefix_inverse + "\t"
|
||||
|
||||
master_content = readFile(master)
|
||||
regex_import_stmt = r"^\ *\{([^\},\n]+)(,[^=\n\}\,]+\=[^\}\n,]*)*\}\ *$"
|
||||
regex_import_comp = re.compile(regex_import_stmt)
|
||||
master_content_list = master_content.splitlines()
|
||||
|
||||
# Walk through file looking for import statements
|
||||
cur_index = 0
|
||||
while cur_index < len(master_content_list):
|
||||
cur_line = master_content_list[cur_index]
|
||||
match = regex_import_comp.match(cur_line)
|
||||
|
||||
if match:
|
||||
importFile = match.groups()[0]
|
||||
if importFile:
|
||||
# Found import statement
|
||||
print(print_prefix+"Importing file: "+importFile.ljust(maxFilnameChars), end="")
|
||||
|
||||
if not isValidImportFilename(importFile):
|
||||
raise "Invalid filename "+importFile+ ". Do not include path redirections"
|
||||
|
||||
variablesGrep = match.string
|
||||
variableReplacers = fetchVariableReplacers(variablesGrep)
|
||||
|
||||
print(print_prefix_inverse, variableReplacers)
|
||||
|
||||
import_content = assembleTarget(importFile, depth=depth-1)
|
||||
|
||||
for key, value in variableReplacers.items():
|
||||
import_content = import_content.replace(r"{{"+key+r"}}", value)
|
||||
|
||||
import_content_list = import_content.splitlines()
|
||||
master_content_list.pop(cur_index)
|
||||
for new_line in reversed(import_content_list):
|
||||
master_content_list.insert(cur_index, new_line)
|
||||
|
||||
cur_index += 1
|
||||
|
||||
# Assemble result
|
||||
master_content = ''.join(str(e)+'\n' for e in master_content_list)
|
||||
return master_content
|
||||
|
||||
# Main function
|
||||
def main():
|
||||
print("Starting config assembly")
|
||||
os.chdir(findCIAssemblyDirectory())
|
||||
target_content = autogenerated_notice
|
||||
target_content += assembleTarget(master_file)
|
||||
|
||||
m = hashlib.sha256()
|
||||
m.update(readFile(target_file).encode('utf-8'))
|
||||
hash_original = m.hexdigest()
|
||||
m = hashlib.sha256()
|
||||
m.update(target_content.encode('utf-8'))
|
||||
m.update("\n".encode('utf-8'))
|
||||
hash_new = m.hexdigest()
|
||||
|
||||
print("Old checksum: ", hash_original)
|
||||
print("New checksum: ", hash_new)
|
||||
|
||||
if (hash_original == hash_new):
|
||||
print("No changes made: Skipping file write")
|
||||
else:
|
||||
print("File differs")
|
||||
print("Writing config to file "+target_file)
|
||||
target_file_handle = open(target_file, "w")
|
||||
target_file_handle.write(target_content)
|
||||
target_file_handle.write("\n")
|
||||
target_file_handle.flush()
|
||||
target_file_handle.close()
|
||||
|
||||
try:
|
||||
yaml.load(target_content, Loader=yaml.SafeLoader)
|
||||
print("Yaml syntax check: OK")
|
||||
except Exception as e:
|
||||
print("Invalid yaml syntax:", e)
|
||||
|
||||
print("Finished.")
|
||||
|
||||
|
||||
# Execute main function
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
37
CI/gitlab-ci/ci-master.yml
Normal file
37
CI/gitlab-ci/ci-master.yml
Normal file
@@ -0,0 +1,37 @@
|
||||
stages:
|
||||
- build
|
||||
- test
|
||||
- deploy
|
||||
|
||||
variables:
|
||||
GIT_SUBMODULE_STRATEGY: recursive
|
||||
|
||||
{linux.yml}
|
||||
|
||||
{mac.yml}
|
||||
|
||||
{windows.yml}
|
||||
|
||||
Doc-publish:
|
||||
stage: deploy
|
||||
only:
|
||||
- master
|
||||
script: "CI/ci-doc.sh"
|
||||
tags:
|
||||
- Linux
|
||||
- stretch
|
||||
|
||||
Sources:
|
||||
stage: deploy
|
||||
only:
|
||||
- master
|
||||
script: "CI/ci-source.sh"
|
||||
tags:
|
||||
- Linux
|
||||
- stretch
|
||||
artifacts:
|
||||
paths:
|
||||
- OpenMesh*.zip
|
||||
- OpenMesh*.tar.bz2
|
||||
- OpenMesh*.tar.gz
|
||||
|
||||
14
CI/gitlab-ci/linux-template-build-job.yml
Normal file
14
CI/gitlab-ci/linux-template-build-job.yml
Normal file
@@ -0,0 +1,14 @@
|
||||
#----------- Job Informations:
|
||||
# Type: Build: {{BUILDTYPE}}
|
||||
# OS: Linux
|
||||
# Compiler: {{COMPILER}}
|
||||
# Language: {{LANGUAGE}}
|
||||
|
||||
build-{{BUILDTYPE}}-{{COMPILER}}-{{LANGUAGE}}:
|
||||
stage: build
|
||||
script: "CI/ci-linux-build.sh {{COMPILER}} {{LANGUAGE}} {{BUILDTYPE}}"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
artifacts:
|
||||
paths:
|
||||
- build-{{COMPILER}}-{{LANGUAGE}}-{{BUILDTYPE}}-Vector-Checks/
|
||||
8
CI/gitlab-ci/linux-template-job.yml
Normal file
8
CI/gitlab-ci/linux-template-job.yml
Normal file
@@ -0,0 +1,8 @@
|
||||
{linux-template-build-job.yml, BUILDTYPE=debug}
|
||||
|
||||
{linux-template-test-job.yml, BUILDTYPE=debug}
|
||||
|
||||
{linux-template-build-job.yml, BUILDTYPE=release}
|
||||
|
||||
{linux-template-test-job.yml, BUILDTYPE=release}
|
||||
|
||||
20
CI/gitlab-ci/linux-template-test-job.yml
Normal file
20
CI/gitlab-ci/linux-template-test-job.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
#----------- Job Informations:
|
||||
# Type: Test: {{BUILDTYPE}}
|
||||
# OS: Linux
|
||||
# Compiler: {{COMPILER}}
|
||||
# Language: {{LANGUAGE}}
|
||||
|
||||
test-{{BUILDTYPE}}-{{COMPILER}}-{{LANGUAGE}}:
|
||||
stage: test
|
||||
script: "CI/ci-linux-test.sh {{COMPILER}} {{LANGUAGE}} {{BUILDTYPE}}"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
dependencies: [build-{{BUILDTYPE}}-{{COMPILER}}-{{LANGUAGE}}]
|
||||
needs: [build-{{BUILDTYPE}}-{{COMPILER}}-{{LANGUAGE}}]
|
||||
artifacts:
|
||||
reports:
|
||||
junit:
|
||||
- build-{{COMPILER}}-{{LANGUAGE}}-{{BUILDTYPE}}-Vector-Checks/Unittests/report.xml
|
||||
- build-{{COMPILER}}-{{LANGUAGE}}-{{BUILDTYPE}}-Vector-Checks/Unittests/report-customvec.xml
|
||||
- build-{{COMPILER}}-{{LANGUAGE}}-{{BUILDTYPE}}-Vector-Checks/Unittests/report-doublevec.xml
|
||||
|
||||
18
CI/gitlab-ci/linux.yml
Normal file
18
CI/gitlab-ci/linux.yml
Normal file
@@ -0,0 +1,18 @@
|
||||
# -----------------
|
||||
# Linux tasks
|
||||
# -----------------
|
||||
|
||||
cppcheck:
|
||||
stage: build
|
||||
script: "CI/ci-cppcheck.sh"
|
||||
image: graphics.rwth-aachen.de:4567/docker/docker/docker-openmesh-container
|
||||
tags: [Docker]
|
||||
timeout: 3h
|
||||
artifacts:
|
||||
paths:
|
||||
- cppcheck.log
|
||||
|
||||
{linux-template-job.yml, COMPILER=gcc, LANGUAGE=cpp11}
|
||||
{linux-template-job.yml, COMPILER=clang, LANGUAGE=cpp11}
|
||||
{linux-template-job.yml, COMPILER=gcc, LANGUAGE=cpp14}
|
||||
{linux-template-job.yml, COMPILER=clang, LANGUAGE=cpp14}
|
||||
20
CI/gitlab-ci/mac-template-job.yml
Normal file
20
CI/gitlab-ci/mac-template-job.yml
Normal file
@@ -0,0 +1,20 @@
|
||||
#----------- Job Informations:
|
||||
# Type: Build+Test: {{BUILDTYPE}}
|
||||
# OS: Mac
|
||||
# Language: {{LANGUAGE}}
|
||||
|
||||
macos-{{LANGUAGE}}-{{BUILDTYPE}}:
|
||||
stage: build
|
||||
script: "CI/ci-mac-build.sh {{LANGUAGE}} {{BUILDTYPE}} ; CI/ci-mac-test.sh {{LANGUAGE}} {{BUILDTYPE}}"
|
||||
tags:
|
||||
- Apple
|
||||
artifacts:
|
||||
paths:
|
||||
- build-{{BUILDTYPE}}-{{LANGUAGE}}/*.dmg
|
||||
- build-{{BUILDTYPE}}-{{LANGUAGE}}/*.tar.gz
|
||||
# reports:
|
||||
# junit:
|
||||
# - build-{{BUILDTYPE}}-{{LANGUAGE}}/Unittests/report.xml
|
||||
# - build-{{BUILDTYPE}}-{{LANGUAGE}}/Unittests/report-customvec.xml
|
||||
# - build-{{BUILDTYPE}}-{{LANGUAGE}}/Unittests/report-doublevec.xml
|
||||
|
||||
10
CI/gitlab-ci/mac.yml
Normal file
10
CI/gitlab-ci/mac.yml
Normal file
@@ -0,0 +1,10 @@
|
||||
# -----------------
|
||||
# MAC tasks
|
||||
# -----------------
|
||||
|
||||
{mac-template-job.yml, BUILDTYPE=debug, LANGUAGE=cpp11}
|
||||
{mac-template-job.yml, BUILDTYPE=release, LANGUAGE=cpp11}
|
||||
|
||||
{mac-template-job.yml, BUILDTYPE=debug, LANGUAGE=cpp14}
|
||||
{mac-template-job.yml, BUILDTYPE=release, LANGUAGE=cpp14}
|
||||
|
||||
47
CI/gitlab-ci/windows-template-job.yml
Normal file
47
CI/gitlab-ci/windows-template-job.yml
Normal file
@@ -0,0 +1,47 @@
|
||||
#------------- Job Informations:
|
||||
# Type: Build+Test: Release
|
||||
# OS: Windows
|
||||
# Architecture: {{ARCHITECTURE}}
|
||||
# Shared: {{SHARED}}
|
||||
# VS Version: {{VSVERSION}}
|
||||
# Apps: {{APPS}}
|
||||
|
||||
build-{{VSVERSION}}-{{ARCHITECTURE}}-shared-{{SHARED}}-apps:
|
||||
stage: build
|
||||
variables:
|
||||
BUILD_PLATFORM: "{{VSVERSION}}"
|
||||
ARCHITECTURE: "{{ARCHITECTURE}}"
|
||||
SHARED: "{{SHARED}}"
|
||||
APPS: "ON"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- {{VSVERSION}}
|
||||
- {{QTTAG}}
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
reports:
|
||||
junit:
|
||||
- build-release/unittests/report.xml
|
||||
- build-release/unittests/report-customvec.xml
|
||||
- build-release/unittests/report-doublevec.xml
|
||||
|
||||
build-{{VSVERSION}}-{{ARCHITECTURE}}-shared-{{SHARED}}-no-apps:
|
||||
stage: build
|
||||
variables:
|
||||
BUILD_PLATFORM: "{{VSVERSION}}"
|
||||
ARCHITECTURE: "{{ARCHITECTURE}}"
|
||||
SHARED: "{{SHARED}}"
|
||||
APPS: "OFF"
|
||||
script: "CI\\Windows.bat"
|
||||
tags:
|
||||
- {{VSVERSION}}
|
||||
artifacts:
|
||||
paths:
|
||||
- build-release/*.exe
|
||||
reports:
|
||||
junit:
|
||||
- build-release/unittests/report.xml
|
||||
- build-release/unittests/report-customvec.xml
|
||||
- build-release/unittests/report-doublevec.xml
|
||||
|
||||
9
CI/gitlab-ci/windows.yml
Normal file
9
CI/gitlab-ci/windows.yml
Normal file
@@ -0,0 +1,9 @@
|
||||
# -----------------
|
||||
# Windows tasks
|
||||
# -----------------
|
||||
|
||||
{windows-template-job.yml, ARCHITECTURE=x64, SHARED=TRUE, VSVERSION=VS2017, QTTAG=Qt5101}
|
||||
{windows-template-job.yml, ARCHITECTURE=x64, SHARED=FALSE, VSVERSION=VS2017, QTTAG=Qt5101}
|
||||
|
||||
{windows-template-job.yml, ARCHITECTURE=x64, SHARED=TRUE, VSVERSION=VS2015, QTTAG=Qt5101}
|
||||
{windows-template-job.yml, ARCHITECTURE=x64, SHARED=FALSE, VSVERSION=VS2015, QTTAG=Qt5101}
|
||||
44
CMakeLists.txt
Normal file → Executable file
44
CMakeLists.txt
Normal file → Executable file
@@ -1,4 +1,9 @@
|
||||
cmake_minimum_required (VERSION 2.6)
|
||||
cmake_minimum_required(VERSION 3.1.0 FATAL_ERROR)
|
||||
|
||||
|
||||
# Set and enforce C++-11 flags
|
||||
set( CMAKE_CXX_STANDARD_REQUIRED TRUE )
|
||||
set( CMAKE_CXX_STANDARD 11 )
|
||||
|
||||
enable_testing()
|
||||
|
||||
@@ -7,6 +12,12 @@ if("${PROJECT_NAME}" STREQUAL "")
|
||||
project (OpenMesh)
|
||||
endif()
|
||||
|
||||
# Set AUTO UIC/MOC Policy to new for CMAKE 3.17 or higher
|
||||
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.17")
|
||||
cmake_policy(SET CMP0100 NEW)
|
||||
endif()
|
||||
|
||||
|
||||
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
|
||||
if(CMAKE_CXX_COMPILER_VERSION VERSION_LESS "6.0" AND CMAKE_CXX_COMPILER_VERSION VERSION_GREATER "4.9" OR CMAKE_CXX_COMPILER_VERSION VERSION_EQUAL "4.9")
|
||||
message(WARNING "Your version of GCC contains an optimizer bug. Please verify that you do not use -O3!")
|
||||
@@ -41,6 +52,7 @@ if(${PROJECT_NAME} MATCHES "OpenMesh")
|
||||
endif()
|
||||
|
||||
include (ACGOutput)
|
||||
include(ACGQt)
|
||||
|
||||
# ========================================================================
|
||||
# Definitions
|
||||
@@ -127,13 +139,13 @@ else()
|
||||
set (OPENMESH_LIBRARY_DIR "${_OPENMESH_LIBRARY_DIR}" CACHE PATH "The directory where the OpenMesh libraries can be found.")
|
||||
endif()
|
||||
|
||||
if ( NOT DEFINED OPENMESH_DOCS )
|
||||
set( OPENMESH_DOCS true CACHE BOOL "Enable or disable building of documentation" )
|
||||
endif()
|
||||
|
||||
if (OPENMESH_DOCS)
|
||||
add_subdirectory (Doc)
|
||||
|
||||
# ========================================================================
|
||||
# Include Python interface
|
||||
# ========================================================================
|
||||
|
||||
add_subdirectory (src/Python)
|
||||
endif()
|
||||
|
||||
# ========================================================================
|
||||
# Bundle generation (Targets exist, now configure them)
|
||||
@@ -144,8 +156,8 @@ if(${PROJECT_NAME} MATCHES "OpenMesh")
|
||||
|
||||
if (WIN32 AND BUILD_APPS )
|
||||
# prepare bundle generation cmake file and add a build target for it
|
||||
configure_file ("${CMAKE_SOURCE_DIR}/cmake/fixbundle.cmake.win.in"
|
||||
"${CMAKE_BINARY_DIR}/fixbundle.win.cmake" @ONLY IMMEDIATE)
|
||||
configure_file ("${CMAKE_CURRENT_SOURCE_DIR}/cmake/fixbundle.cmake.win.in"
|
||||
"${CMAKE_CURRENT_BINARY_DIR}/fixbundle.win.cmake" @ONLY IMMEDIATE)
|
||||
|
||||
if ( NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" )
|
||||
# let bundle generation depend on all targets
|
||||
@@ -175,6 +187,20 @@ endif()
|
||||
|
||||
# ========================================================================
|
||||
|
||||
# Generate openmesh.pc file
|
||||
|
||||
set(DEST_DIR "${CMAKE_INSTALL_PREFIX}")
|
||||
set(PRIVATE_LIBS "-lOpenMeshCore -lOpenMeshTools")
|
||||
|
||||
configure_file("openmesh.pc.in" "${CMAKE_CURRENT_BINARY_DIR}/openmesh.pc" @ONLY)
|
||||
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/openmesh.pc DESTINATION libdata/pkgconfig)
|
||||
|
||||
# generate target file
|
||||
|
||||
install(EXPORT OpenMeshConfig DESTINATION share/OpenMesh/cmake)
|
||||
|
||||
export(TARGETS OpenMeshCore OpenMeshTools FILE OpenMeshConfig.cmake)
|
||||
|
||||
# display results
|
||||
acg_print_configure_header (OPENMESH "OpenMesh")
|
||||
|
||||
@@ -40,12 +40,7 @@
|
||||
* ========================================================================= */
|
||||
|
||||
|
||||
/*===========================================================================*\
|
||||
* *
|
||||
* $Revision$ *
|
||||
* $Date$ *
|
||||
* *
|
||||
\*===========================================================================*/
|
||||
|
||||
|
||||
|
||||
//=============================================================================
|
||||
|
||||
@@ -40,14 +40,6 @@
|
||||
* ========================================================================= */
|
||||
|
||||
|
||||
/*===========================================================================*\
|
||||
* *
|
||||
* $Revision$ *
|
||||
* $Date$ *
|
||||
* *
|
||||
\*===========================================================================*/
|
||||
|
||||
|
||||
//=============================================================================
|
||||
//
|
||||
// Kernel Concept
|
||||
|
||||
@@ -1,158 +0,0 @@
|
||||
##################################################
|
||||
# Getting Started
|
||||
##################################################
|
||||
|
||||
from openmesh import *
|
||||
|
||||
mesh = TriMesh()
|
||||
|
||||
|
||||
##################################################
|
||||
# Adding Items to a Mesh
|
||||
##################################################
|
||||
|
||||
# add a a couple of vertices to the mesh
|
||||
vh0 = mesh.add_vertex(TriMesh.Point(0, 1, 0))
|
||||
vh1 = mesh.add_vertex(TriMesh.Point(1, 0, 0))
|
||||
vh2 = mesh.add_vertex(TriMesh.Point(2, 1, 0))
|
||||
vh3 = mesh.add_vertex(TriMesh.Point(0,-1, 0))
|
||||
vh4 = mesh.add_vertex(TriMesh.Point(2,-1, 0))
|
||||
|
||||
# add a couple of faces to the mesh
|
||||
fh0 = mesh.add_face(vh0, vh1, vh2)
|
||||
fh1 = mesh.add_face(vh1, vh3, vh4)
|
||||
fh2 = mesh.add_face(vh0, vh3, vh1)
|
||||
|
||||
# add another face to the mesh, this time using a list
|
||||
vh_list = [vh2, vh1, vh4]
|
||||
fh3 = mesh.add_face(vh_list)
|
||||
|
||||
# 0 ==== 2
|
||||
# |\ 0 /|
|
||||
# | \ / |
|
||||
# |2 1 3|
|
||||
# | / \ |
|
||||
# |/ 1 \|
|
||||
# 3 ==== 4
|
||||
|
||||
|
||||
##################################################
|
||||
# Iterators
|
||||
##################################################
|
||||
|
||||
# iterate over all vertices
|
||||
for vh in mesh.vertices():
|
||||
print vh.idx()
|
||||
|
||||
# iterate over all halfedges
|
||||
for heh in mesh.halfedges():
|
||||
print heh.idx()
|
||||
|
||||
# iterate over all edges
|
||||
for eh in mesh.edges():
|
||||
print eh.idx()
|
||||
|
||||
# iterate over all faces
|
||||
for fh in mesh.faces():
|
||||
print fh.idx()
|
||||
|
||||
|
||||
##################################################
|
||||
# Circulators
|
||||
##################################################
|
||||
|
||||
# iterate over all neighboring vertices
|
||||
for vh in mesh.vv(vh1):
|
||||
print vh.idx()
|
||||
|
||||
# iterate over all incoming halfedges
|
||||
for heh in mesh.vih(vh1):
|
||||
print heh.idx()
|
||||
|
||||
# iterate over all outgoing halfedges
|
||||
for heh in mesh.voh(vh1):
|
||||
print heh.idx()
|
||||
|
||||
# iterate over all adjacent edges
|
||||
for eh in mesh.ve(vh1):
|
||||
print eh.idx()
|
||||
|
||||
# iterate over all adjacent faces
|
||||
for fh in mesh.vf(vh1):
|
||||
print fh.idx()
|
||||
|
||||
# iterate over the face's vertices
|
||||
for vh in mesh.fv(fh0):
|
||||
print vh.idx()
|
||||
|
||||
# iterate over the face's halfedges
|
||||
for heh in mesh.fh(fh0):
|
||||
print heh.idx()
|
||||
|
||||
# iterate over the face's edges
|
||||
for eh in mesh.fe(fh0):
|
||||
print eh.idx()
|
||||
|
||||
# iterate over all edge-neighboring faces
|
||||
for fh in mesh.ff(fh0):
|
||||
print fh.idx()
|
||||
|
||||
|
||||
##################################################
|
||||
# Properties
|
||||
##################################################
|
||||
|
||||
prop_handle = VPropHandle()
|
||||
mesh.add_property(prop_handle, "cogs")
|
||||
|
||||
for vh in mesh.vertices():
|
||||
cog = TriMesh.Point(0,0,0)
|
||||
valence = 0
|
||||
for neighbor in mesh.vv(vh):
|
||||
cog += mesh.point(neighbor)
|
||||
valence += 1
|
||||
mesh.set_property(prop_handle, vh, cog / valence)
|
||||
|
||||
mesh.remove_property(prop_handle)
|
||||
|
||||
|
||||
##################################################
|
||||
# Property Managers
|
||||
##################################################
|
||||
|
||||
prop_man = VPropertyManager(mesh, "cogs")
|
||||
|
||||
prop_man.set_range(mesh.vertices(), TriMesh.Point(0,0,0))
|
||||
|
||||
for vh in mesh.vertices():
|
||||
valence = 0
|
||||
for neighbor in mesh.vv(vh):
|
||||
prop_man[vh] += mesh.point(neighbor)
|
||||
valence += 1
|
||||
prop_man[vh] /= valence
|
||||
|
||||
|
||||
##################################################
|
||||
# I/O
|
||||
##################################################
|
||||
|
||||
mesh = TriMesh()
|
||||
|
||||
read_mesh(mesh, "bunny.obj")
|
||||
# modify mesh ...
|
||||
write_mesh(mesh, "bunny.obj")
|
||||
|
||||
|
||||
mesh = TriMesh()
|
||||
mesh.request_halfedge_normals()
|
||||
mesh.request_vertex_normals()
|
||||
|
||||
options = Options()
|
||||
options += Options.VertexNormal
|
||||
|
||||
result = read_mesh(mesh, "bunny.obj", options)
|
||||
|
||||
if result:
|
||||
print "everything worked"
|
||||
else:
|
||||
print "something went wrong"
|
||||
@@ -39,13 +39,6 @@
|
||||
* *
|
||||
* ========================================================================= */
|
||||
|
||||
/*===========================================================================*\
|
||||
* *
|
||||
* $Revision$ *
|
||||
* $Date$ *
|
||||
* *
|
||||
\*===========================================================================*/
|
||||
|
||||
|
||||
#include <iostream>
|
||||
// -------------------- OpenMesh
|
||||
|
||||
@@ -1,74 +1,57 @@
|
||||
#include <OpenMesh/Core/IO/MeshIO.hh>
|
||||
#include <OpenMesh/Core/Mesh/DefaultTriMesh.hh>
|
||||
#include <OpenMesh/Core/Utils/PropertyManager.hh>
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
// --------------------
|
||||
#include <OpenMesh/Core/IO/MeshIO.hh>
|
||||
#include <OpenMesh/Core/Mesh/TriMesh_ArrayKernelT.hh>
|
||||
|
||||
typedef OpenMesh::TriMesh_ArrayKernelT<> MyMesh;
|
||||
|
||||
using MyMesh = OpenMesh::TriMesh;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// Read command line options
|
||||
MyMesh mesh;
|
||||
if (argc != 4) {
|
||||
std::cerr << "Usage: " << argv[0] << " #iterations infile outfile" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
const int iterations = argv[1];
|
||||
const std::string infile = argv[2];
|
||||
const std::string outfile = argv[3];
|
||||
|
||||
|
||||
// check command line options
|
||||
if (argc != 4)
|
||||
{
|
||||
std::cerr << "Usage: " << argv[0] << " #iterations infile outfile\n";
|
||||
// Read mesh file
|
||||
if (!OpenMesh::IO::read_mesh(mesh, infile)) {
|
||||
std::cerr << "Error: Cannot read mesh from " << infile << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
||||
|
||||
// read mesh from stdin
|
||||
if ( ! OpenMesh::IO::read_mesh(mesh, argv[2]) )
|
||||
{
|
||||
std::cerr << "Error: Cannot read mesh from " << argv[2] << std::endl;
|
||||
return 1;
|
||||
}
|
||||
// Add a vertex property storing the computed centers of gravity
|
||||
auto cog = OpenMesh::VProp<MyMesh::Point>(mesh);
|
||||
|
||||
|
||||
|
||||
// this vertex property stores the computed centers of gravity
|
||||
OpenMesh::VPropHandleT<MyMesh::Point> cogs;
|
||||
mesh.add_property(cogs);
|
||||
|
||||
// smoothing mesh argv[1] times
|
||||
MyMesh::VertexIter v_it, v_end(mesh.vertices_end());
|
||||
MyMesh::VertexVertexIter vv_it;
|
||||
MyMesh::Point cog;
|
||||
MyMesh::Scalar valence;
|
||||
unsigned int i, N(atoi(argv[1]));
|
||||
|
||||
|
||||
for (i=0; i < N; ++i)
|
||||
{
|
||||
for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
|
||||
{
|
||||
mesh.property(cogs,*v_it).vectorize(0.0f);
|
||||
valence = 0.0;
|
||||
|
||||
for (vv_it=mesh.vv_iter( *v_it ); vv_it; ++vv_it)
|
||||
{
|
||||
mesh.property(cogs,*v_it) += mesh.point( *vv_it );
|
||||
// Smooth the mesh several times
|
||||
for (int i = 0; i < iterations; ++i) {
|
||||
// Iterate over all vertices to compute centers of gravity
|
||||
for (const auto& vh : mesh.vertices()) {
|
||||
cog[vh] = {0,0,0};
|
||||
int valence = 0;
|
||||
// Iterate over all 1-ring vertices around vh
|
||||
for (const auto& vvh : mesh.vv_range(vh)) {
|
||||
cog[vh] += mesh.point(vvh);
|
||||
++valence;
|
||||
}
|
||||
mesh.property(cogs,*v_it) /= valence;
|
||||
cog[vh] /= valence;
|
||||
}
|
||||
|
||||
for (v_it=mesh.vertices_begin(); v_it!=v_end; ++v_it)
|
||||
if ( !mesh.is_boundary( *v_it ) )
|
||||
mesh.set_point( *v_it, mesh.property(cogs,*v_it) );
|
||||
// Move all vertices to the previously computed positions
|
||||
for (const auto& vh : mesh.vertices()) {
|
||||
mesh.point(vh) = cog[vh];
|
||||
}
|
||||
}
|
||||
} // The cog vertex property is removed from the mesh at the end of this scope
|
||||
|
||||
|
||||
// write mesh to stdout
|
||||
if ( ! OpenMesh::IO::write_mesh(mesh, argv[3]) )
|
||||
{
|
||||
std::cerr << "Error: cannot write mesh to " << argv[3] << std::endl;
|
||||
// Write mesh file
|
||||
if (!OpenMesh::IO::read_mesh(mesh, outfile)) {
|
||||
std::cerr << "Error: Cannot write mesh to " << outfile << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ public:
|
||||
public:
|
||||
|
||||
// construct with a given mesh
|
||||
SmootherT(Mesh& _mesh)
|
||||
explicit SmootherT(Mesh& _mesh)
|
||||
: mesh_(_mesh)
|
||||
{
|
||||
mesh_.add_property( cog_ );
|
||||
|
||||
@@ -39,14 +39,6 @@
|
||||
* *
|
||||
* ========================================================================= */
|
||||
|
||||
/*===========================================================================*\
|
||||
* *
|
||||
* $Revision: 736 $ *
|
||||
* $Date: 2012-10-08 09:30:49 +0200 (Mo, 08. Okt 2012) $ *
|
||||
* *
|
||||
\*===========================================================================*/
|
||||
|
||||
|
||||
#include <iostream>
|
||||
// -------------------- OpenMesh
|
||||
#include <OpenMesh/Core/IO/MeshIO.hh>
|
||||
|
||||
62
Doc/Tutorial/11-smart_handles/smooth.cc
Normal file
62
Doc/Tutorial/11-smart_handles/smooth.cc
Normal file
@@ -0,0 +1,62 @@
|
||||
|
||||
#include <OpenMesh/Core/IO/MeshIO.hh>
|
||||
#include <OpenMesh/Core/Mesh/DefaultTriMesh.hh>
|
||||
#include <OpenMesh/Core/Utils/PropertyManager.hh>
|
||||
|
||||
#include <iostream>
|
||||
#include <vector>
|
||||
|
||||
using MyMesh = OpenMesh::TriMesh;
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
// Read command line options
|
||||
MyMesh mesh;
|
||||
if (argc != 4) {
|
||||
std::cerr << "Usage: " << argv[0] << " #iterations infile outfile" << std::endl;
|
||||
return 1;
|
||||
}
|
||||
const int iterations = argv[1];
|
||||
const std::string infile = argv[2];
|
||||
const std::string outfile = argv[3];
|
||||
|
||||
// Read mesh file
|
||||
if (!OpenMesh::IO::read_mesh(mesh, infile)) {
|
||||
std::cerr << "Error: Cannot read mesh from " << infile << std::endl;
|
||||
return 1;
|
||||
}
|
||||
|
||||
{
|
||||
// Add a vertex property storing the laplace vector
|
||||
auto laplace = OpenMesh::VProp<MyMesh::Point>(mesh);
|
||||
|
||||
// Add a vertex property storing the laplace of the laplace
|
||||
auto bi_laplace = OpenMesh::VProp<MyMesh::Point>(mesh);
|
||||
|
||||
// Get a propertymanager of the points property of the mesh to use as functor
|
||||
auto points = OpenMesh::getPointsProperty(mesh);
|
||||
|
||||
// Smooth the mesh several times
|
||||
for (int i = 0; i < iterations; ++i) {
|
||||
// Iterate over all vertices to compute laplace vector
|
||||
for (const auto& vh : mesh.vertices())
|
||||
laplace(vh) = vh.vertices().avg(points) - points(vh);
|
||||
|
||||
// Iterate over all vertices to compute the laplace vector of the laplace vectors
|
||||
for (const auto& vh : mesh.vertices())
|
||||
bi_laplace(vh) = (vh.vertices().avg(laplace) - laplace(vh));
|
||||
|
||||
// update points by substracting the bi-laplacian damped by a factor of 0.5
|
||||
for (const auto& vh : mesh.vertices())
|
||||
points(vh) += -0.5 * bi_laplace(vh);
|
||||
}
|
||||
} // The laplace and update properties are removed from the mesh at the end of this scope.
|
||||
|
||||
|
||||
// Write mesh file
|
||||
if (!OpenMesh::IO::read_mesh(mesh, outfile)) {
|
||||
std::cerr << "Error: Cannot write mesh to " << outfile << std::endl;
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -6,11 +6,159 @@
|
||||
|
||||
<!-- --------------------------------------------------------------------- -->
|
||||
|
||||
<tr valign=top><td><b>7.0</b> (?/?/?)</td><td>
|
||||
|
||||
<tr valign=top><td><b>9.0</b> (?/?/?)</td><td>
|
||||
|
||||
<b>Breaking Changes</b>
|
||||
<ul>
|
||||
<li>Dropped 32-bit Windows continuous integration and artifact builds (This does not mean that OpenMesh will not build and work on 32-bit, but we don't explicitly test and guarantee it anymore).</li>
|
||||
</ul>
|
||||
|
||||
<b>Core</b>
|
||||
<ul>
|
||||
<li>Add filtered range that stores reference instead of copy if the filter is not an rvalue reference</li>
|
||||
</ul>
|
||||
|
||||
<b>Build System</b>
|
||||
<ul>
|
||||
<li>Dropped 32-bit Windows continuous integration and artifact builds.</li>
|
||||
</ul>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
<tr valign=top><td><b>8.1</b> (2020/04/23)</td><td>
|
||||
|
||||
<b>Breaking Changes</b>
|
||||
<ul>
|
||||
<li>PropertyManager: PropertyManager only gives const access to the underlying mesh.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<b>Core</b>
|
||||
<ul>
|
||||
<li>Property System: Get rid of the OM_FORCE_STATIC_CAST defines. We use the type ids to check if the cast is valid or not. This will add more type safety. </li>
|
||||
<li>Default Traits: Added DefaultTraitsDouble as a version of the default traits that uses double precision for positions and normals as well as float for colors. </li>
|
||||
<li>Default Mesh Types: Added typdefs for a Triangle Mesh and a PolyMesh which use DefaultTraitsDouble and can be used as default mesh type be the user. </li>
|
||||
<li>Template Programming Convenience: Added n_elements which returns the number of elements corresponding to the handle type given as template argument. Also added elements and all_elements methods returning ranges of the elements corresponding to the handle type given as template argument. See the Smart Handles Section under Tutorials in the Documentation.</li>
|
||||
<li>Smart Handles: Most userfacing functions returning handles should now return smart handles instead. Smart handles know their corresponding mesh and give convenient access to mesh navigation methods.
|
||||
<li>Smart Ranges: OpenMesh ranges now provide a few methods that simplify a few calculations. See documentation for more details.
|
||||
</ul>
|
||||
|
||||
|
||||
<b>Tools</b>
|
||||
<ul>
|
||||
<li>Subdivider: Fixed crash in Loop subdivider</li>
|
||||
<li>Subdivider: Fixed crash in ModifiedButterfly subdivider</li>
|
||||
<li>Decimater: Fixed ModNormalDeviationT not working for meshes with Eigen Vectors as vector type</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<b>Utils</b>
|
||||
<ul>
|
||||
<li>Change PropertyManager::operator* to access the property value for mesh properties</li>
|
||||
<li>PropertyManager: add hasProperty function</li>
|
||||
<li>PropertyManager rework: The behavior of the PropertyManager has been changed, hopefully making it more usable. See tutoial.
|
||||
</ul>
|
||||
|
||||
<b>IO</b>
|
||||
<ul>
|
||||
<li>PLY Reader: Fix reading doubles from PLY, missing cast (Thanks to Leo Walsh for the patch)</li>
|
||||
<li>PLY Reader: Some cleanup (Thanks to Morgan Leborgne for the patch)</li>
|
||||
<li>PLY Reader: Support for ushort (Thanks to Morgan Leborgne for the patch)</li>
|
||||
<li>OM Reader: Positions with scalar type double will be stored as doubles.</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<b>Build System</b>
|
||||
<ul>
|
||||
<li>Generate OpenMeshConfig.cmake (Thanks to Thibault Payet for the patch)</li>
|
||||
<li>Support building on FreeBSD (Thanks to Thibault Payet for the patch)</li>
|
||||
<li>Fixed Qt App Problems with cmake >= 3.17</li>
|
||||
</ul>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
<tr valign=top><td><b>8.0</b> (2019/02/21)</td><td>
|
||||
|
||||
<b>Breaking changes:</b>
|
||||
<ul>
|
||||
<li>Don't run and test on VS2013 anymore. As VS2013 still lacks some C++11 features, we remove it from our list of supported platforms</li>
|
||||
<li>(Only internally breaking change:)Get rid of the T.cc naming for template implementations. New names end with T_impl.hh. This avoids all the missing files in the IDE GUIs due to the filtered T.cc files. Also the install targets could be simplified due to this change. For OpenMesh users, this change should be transparent.</li>
|
||||
</ul>
|
||||
|
||||
<b>Core</b>
|
||||
<ul>
|
||||
<li>TriConnectivity: Added two functions split_edge and split_edge_copy to mask the PolyConnectivity functions of the same name (Prevents creation of valence 2 vertices on trimeshes)</li>
|
||||
<li>PolyConnectivity: Fixed PolyConnectivity is_collapse_ok, missing some configurations (Thanks to Simon Flöry for the patch)</li>
|
||||
<li>Connectivity type is now set at compile time</li>
|
||||
<li>Added header to interface with Eigen3 vectors as the basic type (Documentation on how to use it is also integrated)</li>
|
||||
</ul>
|
||||
|
||||
<b>IO</b>
|
||||
<ul>
|
||||
<li>PLY Reader: Allowing the PLY reader to read custom face ( Thanks to morgan Leborgne for the patch)</li>
|
||||
<li>PLY Reader: Fixed endless loop on unknown property list type</li>
|
||||
<li>PLY Reader: Fix hang when reading directly from istream (Thanks to Paul Loré for the patch)</li>
|
||||
<li>PLY Reader: Fix file load for ASCII PLY without a newline at the end of the file (Thanks to Mathieu Lamarre for the patch )
|
||||
<li>PLY Reader/Writer: Support for face colors (Thanks to Steve and Barb Demlow for the patch)</li>
|
||||
<li>OM Writer/Reader: Update file format version to 2.0. Older files can still be read, but older OpenMesh versions cannot read new format.</li>
|
||||
<li>OM Writer/Reader: Fixed inconsistent writing/reading of edge properties</li>
|
||||
<li>OM Writer/Reader: Add option to store status</li>
|
||||
<li>OBJ Writer: Use Fixed as stream option in OBJ writer to avoid problems with other programs reading scientific notation</li>
|
||||
</ul>
|
||||
|
||||
<b>Tools</b>
|
||||
<ul>
|
||||
<li>SmartTagger: Added the SmartTagger class to tag primitives (O(1) reset )</li>
|
||||
</ul>
|
||||
|
||||
<b>Apps</b>
|
||||
<ul>
|
||||
<li>Fixed several warnings with gcc 8</li>
|
||||
<li>Removed the glut dependency</li>
|
||||
</ul>
|
||||
|
||||
<b>Build System</b>
|
||||
<ul>
|
||||
<li>Rename the DEPRECATED macro into OM_DEPRECATED to prevent a macro clash with Intel MKL (Thanks to Morgan Leborgne for the patch)</li>
|
||||
</ul>
|
||||
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
<tr valign=top><td><b>7.1</b> (2018/05/29)</td><td>
|
||||
|
||||
<b>IO</b>
|
||||
<ul>
|
||||
<li>OBJ Reader: Fixed slow OBJ reader (Thanks to Etienne Danvoye for the patch) </li>
|
||||
</ul>
|
||||
|
||||
<b>Documentation</b>
|
||||
<ul>
|
||||
<li>Updated build instructions.</li>
|
||||
</ul>
|
||||
|
||||
<b>Build System</b>
|
||||
<ul>
|
||||
<li>Default to C++11 in cmake files</li>
|
||||
<li>Remove old qmake project files. Unmaintained for a very long time</li>
|
||||
<li>Replaced Qt finders</li>
|
||||
<li>Added VS 2017 to CI builds</li>
|
||||
</ul>
|
||||
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr valign=top><td><b>7.0</b> (2018/04/19)</td><td>
|
||||
|
||||
<b>Breaking changes</b>
|
||||
<ul>
|
||||
<li>The minimal standard for C++ has been raised to C++11. Compilers not supporting C++11 or higher are no longer supported</li>
|
||||
<li>Removed the python bindings from this project. They have migrated to a <a href="https://www.graphics.rwth-aachen.de:9000/OpenMesh/openmesh-python">seperate project</a>.</li>
|
||||
</ul>
|
||||
|
||||
<b>Core</b>
|
||||
@@ -19,12 +167,17 @@
|
||||
<li>make all negative handles invalid, not just -1</li>
|
||||
<li>Several warnings fixed (Including the checked iterators)</li>
|
||||
<li>split_copy and split_edge_copy operations now also copy internal properties.</li>
|
||||
<li>copy face properties in split_copy(EdgeHandle, VertexHandle)</li>
|
||||
<li>fix halfedge indices in OpenMeshTrimeshCirculatorHalfedgeLoop CWAndCCWCheck</li>
|
||||
<li>Fix wrong behaviour of HalfedgeLoopIterators by changing the template parameter</li>
|
||||
<li>Added 1-4 triangle split funtion(splits all edges at Midpoints)</li>
|
||||
<li>Boost range support (Thanks to Bastian Pranzas for the patch)</li>
|
||||
<li>Made the face and edge split operations that copy properties also copy builtin properties</li>
|
||||
<li>calc_sector_angle: Check for real division by zero not with epsilon that was way to large</li>
|
||||
<li>Don't return invalid iterators for empty element ranges</li>
|
||||
<li>Mark halfedges as deleted after collapse</li>
|
||||
<li>Let default range-based for skip deleted elements and add a version that includes deleted elements</li>
|
||||
<li>Moved length() by norm() to external functions. This allows us to support other vector types instead of Vec3d (e.g. via Eigen) </li>
|
||||
</ul>
|
||||
|
||||
<b>Utils</b>
|
||||
@@ -56,7 +209,7 @@
|
||||
<li>BaseExporter: Added accessor functions for HalfEdgeHandles and faceTexCoords to base exporter and exporter template.</li>
|
||||
<li>OBJ Writer: Fail if vertex color export was requested (Thanks to Manuel Massing)</li>
|
||||
<li>OBJ Writer: Added functionality to store FaceTexCoords to objwriter</li>
|
||||
<li>OBJ Writer: Applied fix for bad or missing vertex tex coords (Thanks to Gero Müller for the patch)</li>>
|
||||
<li>OBJ Writer: Applied fix for bad or missing vertex tex coords (Thanks to Gero Müller for the patch)</li>
|
||||
<li>OBJ Writer: Fix vertex texture coordinates export in OBJ writer</li>
|
||||
<li>OBJ Loader: range check for vertex colors and normals in OBJ loader</li>
|
||||
<li>OBJ Loader: fixed handling of negative indices in OBJ loader</li>
|
||||
@@ -73,14 +226,10 @@
|
||||
<li>Added unittest for split_edge_copy operations on Tri and PolyMeshes</li>
|
||||
</ul>
|
||||
|
||||
<b>Python</b>
|
||||
<ul>
|
||||
<li>fix the stripping of the python libs version string</li>
|
||||
</ul>
|
||||
|
||||
<b>General</b>
|
||||
<ul>
|
||||
<li>Updated Logo</li>
|
||||
<li>Only Issue Warning if compile Order for MeshIO.hh is violated. Check will be removed if no errors are reported.</li>
|
||||
</ul>
|
||||
|
||||
</tr>
|
||||
|
||||
162
Doc/compiling.docu
Normal file
162
Doc/compiling.docu
Normal file
@@ -0,0 +1,162 @@
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/** \page compiling Compiling OpenMesh
|
||||
|
||||
\section compilers Tested compilers
|
||||
|
||||
%OpenMesh has been successfully tested for the following operating
|
||||
systems / compilers. This is only a list of tested compilers.
|
||||
More might be supported but are not tested. Make sure that your compiler
|
||||
supports at least C++11
|
||||
|
||||
<table>
|
||||
|
||||
<tr><td> Linux </td><td>
|
||||
gcc >= 6.3<br>
|
||||
clang >= 3.3<br>
|
||||
</td></tr>
|
||||
|
||||
<tr><td> Windows </td><td>
|
||||
Microsoft Visual Studio 2015<br>
|
||||
Microsoft Visual Studio 2017<br>
|
||||
</td></tr>
|
||||
|
||||
<tr><td> Tested MacOS X Compilers</td>
|
||||
<td>
|
||||
XCode <br>
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
\section req_libs Required libraries (Only if you want to build the included Apps)
|
||||
|
||||
Install the following external libraries / frameworks if you want to use the included Applications:<br><br>
|
||||
<table>
|
||||
<tr><td>Qt5</td><td><a href="http://qt-project.org/downloads" target="_blank">https://www.qt.io/download</a></td></tr>
|
||||
</table><br>
|
||||
|
||||
\section build_systems Chosing build system
|
||||
|
||||
%OpenMesh can be built using the <b>cmake</b> build system.
|
||||
<br>
|
||||
<br>
|
||||
|
||||
\section sec_compiling_unix Unix
|
||||
|
||||
\subsection linux_using_cmake Compiling OpenMesh using CMake
|
||||
|
||||
In order to compile %OpenMesh, create a directory named e.g. "build" in
|
||||
OpenMesh's root directory. <b>Change to the newly created directory</b> and type
|
||||
<br/><br/>
|
||||
<tt>
|
||||
cmake .. ## Generates the appropriate Makefiles<br>
|
||||
make ## Builds the project<br>
|
||||
</tt><br>
|
||||
|
||||
\warning If your compiler does not support c++11 natively, you might have to enable it by changing the cmake call to: <br>
|
||||
<tt>cmake .. -DCMAKE_CXX_FLAGS=-std=c++98</tt>
|
||||
|
||||
You can choose the build type by using cmake with the flag<br>
|
||||
<b>-DCMAKE_BUILD_TYPE=(Debug|Release)</b> The default is: Release <br>
|
||||
|
||||
Other flags are:<br/>
|
||||
<b>-DBUILD_APPS=OFF</b> to disable build of applications and<br/>
|
||||
<b>-DCMAKE_INSTALL_PREFIX=<path></b> to specify the install path.<br/>
|
||||
|
||||
When calling <b>make install</b> cmake will install %OpenMesh into this
|
||||
directory using the subdirectories lib/include/bin.
|
||||
|
||||
CMake builds both shared and static under Linux.
|
||||
|
||||
Everything will then be build in the <b>Build</b> subdirectory containing the libraries in <b>lib</b> and the binaries in <b>bin</b>.
|
||||
|
||||
|
||||
There are some additional targets:<br>
|
||||
<b>doc</b>: Builds the Documentation<br>
|
||||
<b>doc-install</b>: Builds the Documentation and installs it<br>
|
||||
<br>
|
||||
\note When you link against the static libraries of OpenMesh and get the error "can not be used when making a
|
||||
shared object; recompile with -fPIC" you need to add "-fPIC" to the CMAKE_CXX_FLAGS. (This is usually added automatically)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
\section sec_compiling_windows Windows
|
||||
|
||||
\subsection windows_using_cmake Compiling OpenMesh using CMake
|
||||
|
||||
Building OpenMesh on Windows requires cmake to generate the project files for Visual Studio.
|
||||
|
||||
|
||||
|
||||
<ul>
|
||||
<li> Get Visual Studio ( 2015-2017 ) </li>
|
||||
<li> Extract %OpenMesh source code. </li>
|
||||
<li> Get all required libraries and install them ( including headers! ).</li>
|
||||
<li> Download and install cmake: <a href="https://cmake.org/download/">www.cmake.org</a>.<br> </li>
|
||||
<li> Start the cmake gui and open the %OpenMesh toplevel directory as source directory </li>
|
||||
<li> Choose a build directory (e.g. create a directory called "build" in OpenMesh's root folder) </li>
|
||||
<li> Click on configure .... If any libraries are left unconfigured, you can adjust the path manually. Rerun configure until everything is configured correctly. <br>
|
||||
Attention: Some build variables are only visible in advanced view mode. Select Visual Studio 9 (2008), Visual Studio 10(2010), Visual Studio 11 (2012), Visual Studio 12 (2013) (Depending on your version) as
|
||||
generator. </li>
|
||||
<li> Click generate to create the visual studio project files </li>
|
||||
<li> You can now find a Visual Studio solution file (OpenMesh.sln) in the <b>build</b> directory you chose in cmake </li>
|
||||
<li> Now you can build %OpenMesh from within Visual Studio using the newly created project file. </li>
|
||||
</ul>
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
\section sec_compiling_macosx MacOS X
|
||||
|
||||
Download and install required libraries as stated above.
|
||||
You can download %OpenMesh's sources from <tt>www.openmesh.org</tt> or check out the latest repository via GIT:<br/>
|
||||
<tt>https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh</tt>.<br/><br/>
|
||||
|
||||
\subsection mac_using_cmake Compiling OpenMesh using CMake
|
||||
|
||||
We recommend you to use CMake >= 3.7 as build system. This can also easily be installed
|
||||
via MacPorts as well as the Qt >= 5.6 library which is used for some example applications
|
||||
in %OpenMesh.<br/>
|
||||
Once installed, change to %OpenMesh's root directory and create a directory
|
||||
named e.g. "buildDebug" (assuming you want to build with debug symbols).<br/>
|
||||
Then type in the following command to initially set up the build environment:
|
||||
<br/><br/>
|
||||
<tt>
|
||||
cmake .. ## Generates the appropriate Makefiles<br>
|
||||
</tt>
|
||||
<br/>
|
||||
Note: If the build directory is not a subdirectory of %OpenMesh's root folder, replace ".." with %OpenMesh's
|
||||
absolute (or relative) path.
|
||||
In order to manually set specific build variables, just type:
|
||||
<br/><br/>
|
||||
<tt>
|
||||
ccmake . ## Configure build environment<br>
|
||||
</tt>
|
||||
<br/>
|
||||
This opens the CMake configure tool. Change the CMAKE_BUILD_TYPE variable to "Release" in order to prepare build
|
||||
for release configuration. Now, when everything is set up, just type:
|
||||
<br/><br/>
|
||||
<tt>
|
||||
make ## Build %OpenMesh<br>
|
||||
</tt>
|
||||
<br/>
|
||||
And optionally:
|
||||
<br/><br/>
|
||||
<tt>
|
||||
make doc ## Build %OpenMesh's documentation<br>
|
||||
</tt>
|
||||
<br>
|
||||
The mac application bundle will be found under "Build" in the recently created build folder.
|
||||
It automatically contains all needed shared objects (libs, fonts, textures, etc.).
|
||||
|
||||
CMake builds both shared and static under MacOS X.
|
||||
|
||||
**/
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -1,4 +1,4 @@
|
||||
# Doxyfile 1.8.8
|
||||
# Doxyfile 1.8.13
|
||||
|
||||
# This file describes the settings to be used by the documentation system
|
||||
# doxygen (www.doxygen.org) for a project.
|
||||
@@ -46,10 +46,10 @@ PROJECT_NUMBER =
|
||||
|
||||
PROJECT_BRIEF =
|
||||
|
||||
# With the PROJECT_LOGO tag one can specify an logo or icon that is included in
|
||||
# the documentation. The maximum height of the logo should not exceed 55 pixels
|
||||
# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo
|
||||
# to the output directory.
|
||||
# With the PROJECT_LOGO tag one can specify a logo or an icon that is included
|
||||
# in the documentation. The maximum height of the logo should not exceed 55
|
||||
# pixels and the maximum width should not exceed 200 pixels. Doxygen will copy
|
||||
# the logo to the output directory.
|
||||
|
||||
PROJECT_LOGO = @CMAKE_CURRENT_SOURCE_DIR@/images/rwth_vci_rgb.jpg
|
||||
|
||||
@@ -60,7 +60,7 @@ PROJECT_LOGO = @CMAKE_CURRENT_SOURCE_DIR@/images/rwth_vci_rgb.jpg
|
||||
|
||||
OUTPUT_DIRECTORY = @CMAKE_BINARY_DIR@/Build/@ACG_PROJECT_DATADIR@/Doc
|
||||
|
||||
# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub-
|
||||
# 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
|
||||
# will distribute the generated files over these directories. Enabling this
|
||||
# option can be useful when feeding doxygen a huge amount of source files, where
|
||||
@@ -93,14 +93,14 @@ ALLOW_UNICODE_NAMES = NO
|
||||
|
||||
OUTPUT_LANGUAGE = English
|
||||
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member
|
||||
# If the BRIEF_MEMBER_DESC tag is set to YES, doxygen will include brief member
|
||||
# descriptions after the members that are listed in the file and class
|
||||
# documentation (similar to Javadoc). Set to NO to disable this.
|
||||
# The default value is: YES.
|
||||
|
||||
BRIEF_MEMBER_DESC = YES
|
||||
|
||||
# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief
|
||||
# If the REPEAT_BRIEF tag is set to YES, doxygen will prepend the brief
|
||||
# description of a member or function before the detailed description
|
||||
#
|
||||
# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the
|
||||
@@ -135,7 +135,7 @@ ALWAYS_DETAILED_SEC = NO
|
||||
|
||||
INLINE_INHERITED_MEMB = NO
|
||||
|
||||
# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path
|
||||
# If the FULL_PATH_NAMES tag is set to YES, doxygen will prepend the full path
|
||||
# before files name in the file list and in the header files. If set to NO the
|
||||
# shortest path that makes the file name unique will be used
|
||||
# The default value is: YES.
|
||||
@@ -207,9 +207,9 @@ MULTILINE_CPP_IS_BRIEF = NO
|
||||
|
||||
INHERIT_DOCS = YES
|
||||
|
||||
# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a
|
||||
# new page for each member. If set to NO, the documentation of a member will be
|
||||
# part of the file/class/namespace that contains it.
|
||||
# If the SEPARATE_MEMBER_PAGES tag is set to YES then doxygen will produce a new
|
||||
# page for each member. If set to NO, the documentation of a member will be part
|
||||
# of the file/class/namespace that contains it.
|
||||
# The default value is: NO.
|
||||
|
||||
SEPARATE_MEMBER_PAGES = NO
|
||||
@@ -278,7 +278,7 @@ OPTIMIZE_OUTPUT_VHDL = NO
|
||||
# instance to make doxygen treat .inc files as Fortran files (default is PHP),
|
||||
# and .f files as C (default is Fortran), use: inc=Fortran f=C.
|
||||
#
|
||||
# Note For files without extension you can use no_extension as a placeholder.
|
||||
# Note: For files without extension you can use no_extension as a placeholder.
|
||||
#
|
||||
# Note that for custom extensions you also need to set FILE_PATTERNS otherwise
|
||||
# the files are not read by doxygen.
|
||||
@@ -295,10 +295,19 @@ EXTENSION_MAPPING =
|
||||
|
||||
MARKDOWN_SUPPORT = YES
|
||||
|
||||
# When the TOC_INCLUDE_HEADINGS tag is set to a non-zero value, all headings up
|
||||
# to that level are automatically included in the table of contents, even if
|
||||
# they do not have an id attribute.
|
||||
# Note: This feature currently applies only to Markdown headings.
|
||||
# Minimum value: 0, maximum value: 99, default value: 0.
|
||||
# This tag requires that the tag MARKDOWN_SUPPORT is set to YES.
|
||||
|
||||
TOC_INCLUDE_HEADINGS = 0
|
||||
|
||||
# When enabled doxygen tries to link words that correspond to documented
|
||||
# classes, or namespaces to their corresponding documentation. Such a link can
|
||||
# be prevented in individual cases by by putting a % sign in front of the word
|
||||
# or globally by setting AUTOLINK_SUPPORT to NO.
|
||||
# be prevented in individual cases by putting a % sign in front of the word or
|
||||
# globally by setting AUTOLINK_SUPPORT to NO.
|
||||
# The default value is: YES.
|
||||
|
||||
AUTOLINK_SUPPORT = YES
|
||||
@@ -338,13 +347,20 @@ SIP_SUPPORT = NO
|
||||
IDL_PROPERTY_SUPPORT = YES
|
||||
|
||||
# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC
|
||||
# tag is set to YES, then doxygen will reuse the documentation of the first
|
||||
# tag is set to YES then doxygen will reuse the documentation of the first
|
||||
# member in the group (if any) for the other members of the group. By default
|
||||
# all members of a group must be documented explicitly.
|
||||
# The default value is: NO.
|
||||
|
||||
DISTRIBUTE_GROUP_DOC = YES
|
||||
|
||||
# If one adds a struct or class to a group and this option is enabled, then also
|
||||
# any nested class or struct is added to the same group. By default this option
|
||||
# is disabled and one has to add nested compounds explicitly via \ingroup.
|
||||
# The default value is: NO.
|
||||
|
||||
GROUP_NESTED_COMPOUNDS = NO
|
||||
|
||||
# Set the SUBGROUPING tag to YES to allow class member groups of the same type
|
||||
# (for instance a group of public functions) to be put as a subgroup of that
|
||||
# type (e.g. under the Public Functions section). Set it to NO to prevent
|
||||
@@ -403,7 +419,7 @@ LOOKUP_CACHE_SIZE = 0
|
||||
# Build related configuration options
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in
|
||||
# If the EXTRACT_ALL tag is set to YES, doxygen will assume all entities in
|
||||
# documentation are documented, even if no documentation was available. Private
|
||||
# class members and static file members will be hidden unless the
|
||||
# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES.
|
||||
@@ -413,35 +429,35 @@ LOOKUP_CACHE_SIZE = 0
|
||||
|
||||
EXTRACT_ALL = NO
|
||||
|
||||
# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will
|
||||
# If the EXTRACT_PRIVATE tag is set to YES, all private members of a class will
|
||||
# be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_PRIVATE = NO
|
||||
|
||||
# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
|
||||
# If the EXTRACT_PACKAGE tag is set to YES, all members with package or internal
|
||||
# scope will be included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_PACKAGE = NO
|
||||
|
||||
# If the EXTRACT_STATIC tag is set to YES all static members of a file will be
|
||||
# If the EXTRACT_STATIC tag is set to YES, all static members of a file will be
|
||||
# included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
EXTRACT_STATIC = NO
|
||||
|
||||
# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined
|
||||
# locally in source files will be included in the documentation. If set to NO
|
||||
# If the EXTRACT_LOCAL_CLASSES tag is set to YES, classes (and structs) defined
|
||||
# locally in source files will be included in the documentation. If set to NO,
|
||||
# only classes defined in header files are included. Does not have any effect
|
||||
# for Java sources.
|
||||
# The default value is: YES.
|
||||
|
||||
EXTRACT_LOCAL_CLASSES = YES
|
||||
|
||||
# This flag is only useful for Objective-C code. When set to YES local methods,
|
||||
# This flag is only useful for Objective-C code. If set to YES, local methods,
|
||||
# which are defined in the implementation section but not in the interface are
|
||||
# included in the documentation. If set to NO only methods in the interface are
|
||||
# included in the documentation. If set to NO, only methods in the interface are
|
||||
# included.
|
||||
# The default value is: NO.
|
||||
|
||||
@@ -466,21 +482,21 @@ HIDE_UNDOC_MEMBERS = NO
|
||||
|
||||
# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all
|
||||
# undocumented classes that are normally visible in the class hierarchy. If set
|
||||
# to NO these classes will be included in the various overviews. This option has
|
||||
# no effect if EXTRACT_ALL is enabled.
|
||||
# to NO, these classes will be included in the various overviews. This option
|
||||
# has no effect if EXTRACT_ALL is enabled.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_UNDOC_CLASSES = NO
|
||||
|
||||
# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend
|
||||
# (class|struct|union) declarations. If set to NO these declarations will be
|
||||
# (class|struct|union) declarations. If set to NO, these declarations will be
|
||||
# included in the documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_FRIEND_COMPOUNDS = NO
|
||||
|
||||
# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any
|
||||
# documentation blocks found inside the body of a function. If set to NO these
|
||||
# documentation blocks found inside the body of a function. If set to NO, these
|
||||
# blocks will be appended to the function's detailed documentation block.
|
||||
# The default value is: NO.
|
||||
|
||||
@@ -494,7 +510,7 @@ HIDE_IN_BODY_DOCS = NO
|
||||
INTERNAL_DOCS = YES
|
||||
|
||||
# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file
|
||||
# names in lower-case letters. If set to YES upper-case letters are also
|
||||
# names in lower-case letters. If set to YES, upper-case letters are also
|
||||
# allowed. This is useful if you have classes or files whose names only differ
|
||||
# in case and if your file system supports case sensitive file names. Windows
|
||||
# and Mac users are advised to set this option to NO.
|
||||
@@ -503,12 +519,19 @@ INTERNAL_DOCS = YES
|
||||
CASE_SENSE_NAMES = YES
|
||||
|
||||
# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with
|
||||
# their full class and namespace scopes in the documentation. If set to YES the
|
||||
# their full class and namespace scopes in the documentation. If set to YES, the
|
||||
# scope will be hidden.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_SCOPE_NAMES = NO
|
||||
|
||||
# If the HIDE_COMPOUND_REFERENCE tag is set to NO (default) then doxygen will
|
||||
# append additional text to a page's title, such as Class Reference. If set to
|
||||
# YES the compound reference will be hidden.
|
||||
# The default value is: NO.
|
||||
|
||||
HIDE_COMPOUND_REFERENCE= NO
|
||||
|
||||
# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of
|
||||
# the files that are included by a file in the documentation of that file.
|
||||
# The default value is: YES.
|
||||
@@ -536,14 +559,14 @@ INLINE_INFO = YES
|
||||
|
||||
# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the
|
||||
# (detailed) documentation of file and class members alphabetically by member
|
||||
# name. If set to NO the members will appear in declaration order.
|
||||
# name. If set to NO, the members will appear in declaration order.
|
||||
# The default value is: YES.
|
||||
|
||||
SORT_MEMBER_DOCS = YES
|
||||
|
||||
# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief
|
||||
# descriptions of file, namespace and class members alphabetically by member
|
||||
# name. If set to NO the members will appear in declaration order. Note that
|
||||
# name. If set to NO, the members will appear in declaration order. Note that
|
||||
# this will also influence the order of the classes in the class list.
|
||||
# The default value is: NO.
|
||||
|
||||
@@ -588,16 +611,14 @@ SORT_BY_SCOPE_NAME = NO
|
||||
|
||||
STRICT_PROTO_MATCHING = NO
|
||||
|
||||
# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the
|
||||
# todo list. This list is created by putting \todo commands in the
|
||||
# documentation.
|
||||
# The GENERATE_TODOLIST tag can be used to enable (YES) or disable (NO) the todo
|
||||
# list. This list is created by putting \todo commands in the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_TODOLIST = YES
|
||||
|
||||
# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the
|
||||
# test list. This list is created by putting \test commands in the
|
||||
# documentation.
|
||||
# The GENERATE_TESTLIST tag can be used to enable (YES) or disable (NO) the test
|
||||
# list. This list is created by putting \test commands in the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_TESTLIST = YES
|
||||
@@ -633,8 +654,8 @@ ENABLED_SECTIONS = OPENMESH_INTERNAL_DOC
|
||||
MAX_INITIALIZER_LINES = 30
|
||||
|
||||
# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at
|
||||
# the bottom of the documentation of classes and structs. If set to YES the list
|
||||
# will mention the files that were used to generate the documentation.
|
||||
# the bottom of the documentation of classes and structs. If set to YES, the
|
||||
# list will mention the files that were used to generate the documentation.
|
||||
# The default value is: YES.
|
||||
|
||||
SHOW_USED_FILES = YES
|
||||
@@ -706,7 +727,7 @@ QUIET = YES
|
||||
|
||||
WARNINGS = YES
|
||||
|
||||
# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate
|
||||
# If the WARN_IF_UNDOCUMENTED tag is set to YES then doxygen will generate
|
||||
# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag
|
||||
# will automatically be disabled.
|
||||
# The default value is: YES.
|
||||
@@ -723,12 +744,18 @@ WARN_IF_DOC_ERROR = YES
|
||||
|
||||
# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that
|
||||
# are documented, but have no documentation for their parameters or return
|
||||
# value. If set to NO doxygen will only warn about wrong or incomplete parameter
|
||||
# documentation, but not about the absence of documentation.
|
||||
# value. If set to NO, doxygen will only warn about wrong or incomplete
|
||||
# parameter documentation, but not about the absence of documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_NO_PARAMDOC = NO
|
||||
|
||||
# If the WARN_AS_ERROR tag is set to YES then doxygen will immediately stop when
|
||||
# a warning is encountered.
|
||||
# The default value is: NO.
|
||||
|
||||
WARN_AS_ERROR = NO
|
||||
|
||||
# The WARN_FORMAT tag determines the format of the warning messages that doxygen
|
||||
# can produce. The string should contain the $file, $line, and $text tags, which
|
||||
# will be replaced by the file and line number from which the warning originated
|
||||
@@ -752,7 +779,7 @@ WARN_LOGFILE =
|
||||
# The INPUT tag is used to specify the files and/or directories that contain
|
||||
# documented source files. You may enter file names like myfile.cpp or
|
||||
# directories like /usr/src/myproject. Separate the files or directories with
|
||||
# spaces.
|
||||
# spaces. See also FILE_PATTERNS and EXTENSION_MAPPING
|
||||
# Note: If this tag is empty the current directory is searched.
|
||||
|
||||
INPUT = @CMAKE_CURRENT_SOURCE_DIR@/..
|
||||
@@ -768,12 +795,17 @@ INPUT_ENCODING = UTF-8
|
||||
|
||||
# If the value of the INPUT tag contains directories, you can use the
|
||||
# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and
|
||||
# *.h) to filter out the source-files in the directories. If left blank the
|
||||
# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii,
|
||||
# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp,
|
||||
# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown,
|
||||
# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf,
|
||||
# *.qsf, *.as and *.js.
|
||||
# *.h) to filter out the source-files in the directories.
|
||||
#
|
||||
# Note that for custom extensions or not directly supported extensions you also
|
||||
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
|
||||
# read by doxygen.
|
||||
#
|
||||
# If left blank the following patterns are tested:*.c, *.cc, *.cxx, *.cpp,
|
||||
# *.c++, *.java, *.ii, *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h,
|
||||
# *.hh, *.hxx, *.hpp, *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc,
|
||||
# *.m, *.markdown, *.md, *.mm, *.dox, *.py, *.pyw, *.f90, *.f95, *.f03, *.f08,
|
||||
# *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf and *.qsf.
|
||||
|
||||
FILE_PATTERNS = *.cc \
|
||||
*.hh \
|
||||
@@ -871,6 +903,10 @@ IMAGE_PATH = @CMAKE_CURRENT_SOURCE_DIR@/images
|
||||
# Note that the filter must not add or remove lines; it is applied before the
|
||||
# code is scanned, but not when the output code is generated. If lines are added
|
||||
# or removed, the anchors will not be placed correctly.
|
||||
#
|
||||
# Note that for custom extensions or not directly supported extensions you also
|
||||
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
|
||||
# properly processed by doxygen.
|
||||
|
||||
INPUT_FILTER =
|
||||
|
||||
@@ -880,6 +916,10 @@ INPUT_FILTER =
|
||||
# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how
|
||||
# filters are used. If the FILTER_PATTERNS tag is empty or if none of the
|
||||
# patterns match the file name, INPUT_FILTER is applied.
|
||||
#
|
||||
# Note that for custom extensions or not directly supported extensions you also
|
||||
# need to set EXTENSION_MAPPING for the extension otherwise the files are not
|
||||
# properly processed by doxygen.
|
||||
|
||||
FILTER_PATTERNS =
|
||||
|
||||
@@ -944,7 +984,7 @@ REFERENCED_BY_RELATION = NO
|
||||
REFERENCES_RELATION = NO
|
||||
|
||||
# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set
|
||||
# to YES, then the hyperlinks from functions in REFERENCES_RELATION and
|
||||
# to YES then the hyperlinks from functions in REFERENCES_RELATION and
|
||||
# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will
|
||||
# link to the documentation.
|
||||
# The default value is: YES.
|
||||
@@ -991,13 +1031,13 @@ USE_HTAGS = NO
|
||||
|
||||
VERBATIM_HEADERS = YES
|
||||
|
||||
# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the
|
||||
# If the CLANG_ASSISTED_PARSING tag is set to YES then doxygen will use the
|
||||
# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the
|
||||
# cost of reduced performance. This can be particularly helpful with template
|
||||
# rich C++ code for which doxygen's built-in parser lacks the necessary type
|
||||
# information.
|
||||
# Note: The availability of this option depends on whether or not doxygen was
|
||||
# compiled with the --with-libclang option.
|
||||
# generated with the -Duse-libclang=ON option for CMake.
|
||||
# The default value is: NO.
|
||||
|
||||
CLANG_ASSISTED_PARSING = NO
|
||||
@@ -1040,7 +1080,7 @@ IGNORE_PREFIX =
|
||||
# Configuration options related to the HTML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output
|
||||
# If the GENERATE_HTML tag is set to YES, doxygen will generate HTML output
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_HTML = YES
|
||||
@@ -1106,7 +1146,7 @@ HTML_STYLESHEET =
|
||||
# cascading style sheets that are included after the standard style sheets
|
||||
# created by doxygen. Using this option one can overrule certain style aspects.
|
||||
# This is preferred over using HTML_STYLESHEET since it does not replace the
|
||||
# standard style sheet and is therefor more robust against future updates.
|
||||
# standard style sheet and is therefore more robust against future updates.
|
||||
# Doxygen will copy the style sheet files to the output directory.
|
||||
# Note: The order of the extra style sheet files is of importance (e.g. the last
|
||||
# style sheet in the list overrules the setting of the previous ones in the
|
||||
@@ -1157,8 +1197,9 @@ HTML_COLORSTYLE_GAMMA = 80
|
||||
|
||||
# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML
|
||||
# page will contain the date and time when the page was generated. Setting this
|
||||
# to NO can help when comparing the output of multiple runs.
|
||||
# The default value is: YES.
|
||||
# to YES can help to show when doxygen was last run and thus if the
|
||||
# documentation is up to date.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
|
||||
HTML_TIMESTAMP = YES
|
||||
@@ -1254,15 +1295,15 @@ GENERATE_HTMLHELP = NO
|
||||
CHM_FILE =
|
||||
|
||||
# The HHC_LOCATION tag can be used to specify the location (absolute path
|
||||
# including file name) of the HTML help compiler ( hhc.exe). If non-empty
|
||||
# including file name) of the HTML help compiler (hhc.exe). If non-empty,
|
||||
# doxygen will try to run the HTML help compiler on the generated index.hhp.
|
||||
# The file has to be specified with full path.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
HHC_LOCATION =
|
||||
|
||||
# The GENERATE_CHI flag controls if a separate .chi index file is generated (
|
||||
# YES) or that it should be included in the master .chm file ( NO).
|
||||
# The GENERATE_CHI flag controls if a separate .chi index file is generated
|
||||
# (YES) or that it should be included in the master .chm file (NO).
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
|
||||
@@ -1274,8 +1315,8 @@ GENERATE_CHI = NO
|
||||
|
||||
CHM_INDEX_ENCODING =
|
||||
|
||||
# The BINARY_TOC flag controls whether a binary table of contents is generated (
|
||||
# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it
|
||||
# The BINARY_TOC flag controls whether a binary table of contents is generated
|
||||
# (YES) or a normal table of contents (NO) in the .chm file. Furthermore it
|
||||
# enables the Previous and Next buttons.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTMLHELP is set to YES.
|
||||
@@ -1417,7 +1458,7 @@ ENUM_VALUES_PER_LINE = 4
|
||||
|
||||
TREEVIEW_WIDTH = 300
|
||||
|
||||
# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to
|
||||
# If the EXT_LINKS_IN_WINDOW option is set to YES, doxygen will open links to
|
||||
# external symbols imported via tag files in a separate window.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_HTML is set to YES.
|
||||
@@ -1446,7 +1487,7 @@ FORMULA_TRANSPARENT = YES
|
||||
|
||||
# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see
|
||||
# http://www.mathjax.org) which uses client side Javascript for the rendering
|
||||
# instead of using prerendered bitmaps. Use this if you do not have LaTeX
|
||||
# instead of using pre-rendered bitmaps. Use this if you do not have LaTeX
|
||||
# installed or if you want to formulas look prettier in the HTML output. When
|
||||
# enabled you may also need to install MathJax separately and configure the path
|
||||
# to it using the MATHJAX_RELPATH option.
|
||||
@@ -1583,7 +1624,7 @@ EXTRA_SEARCH_MAPPINGS =
|
||||
# Configuration options related to the LaTeX output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_LATEX tag is set to YES doxygen will generate LaTeX output.
|
||||
# If the GENERATE_LATEX tag is set to YES, doxygen will generate LaTeX output.
|
||||
# The default value is: YES.
|
||||
|
||||
GENERATE_LATEX = NO
|
||||
@@ -1614,7 +1655,7 @@ LATEX_CMD_NAME = latex
|
||||
|
||||
MAKEINDEX_CMD_NAME = makeindex
|
||||
|
||||
# If the COMPACT_LATEX tag is set to YES doxygen generates more compact LaTeX
|
||||
# If the COMPACT_LATEX tag is set to YES, doxygen generates more compact LaTeX
|
||||
# documents. This may be useful for small projects and may help to save some
|
||||
# trees in general.
|
||||
# The default value is: NO.
|
||||
@@ -1632,9 +1673,12 @@ COMPACT_LATEX = NO
|
||||
PAPER_TYPE = a4wide
|
||||
|
||||
# The EXTRA_PACKAGES tag can be used to specify one or more LaTeX package names
|
||||
# that should be included in the LaTeX output. To get the times font for
|
||||
# instance you can specify
|
||||
# EXTRA_PACKAGES=times
|
||||
# that should be included in the LaTeX output. The package can be specified just
|
||||
# by its name or with the correct syntax as to be used with the LaTeX
|
||||
# \usepackage command. To get the times font for instance you can specify :
|
||||
# EXTRA_PACKAGES=times or EXTRA_PACKAGES={times}
|
||||
# To use the option intlimits with the amsmath package you can specify:
|
||||
# EXTRA_PACKAGES=[intlimits]{amsmath}
|
||||
# If left blank no extra packages will be included.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
@@ -1649,9 +1693,9 @@ EXTRA_PACKAGES =
|
||||
# Note: Only use a user-defined header if you know what you are doing! The
|
||||
# following commands have a special meaning inside the header: $title,
|
||||
# $datetime, $date, $doxygenversion, $projectname, $projectnumber,
|
||||
# $projectbrief, $projectlogo. Doxygen will replace $title with the empy string,
|
||||
# for the replacement values of the other commands the user is refered to
|
||||
# HTML_HEADER.
|
||||
# $projectbrief, $projectlogo. Doxygen will replace $title with the empty
|
||||
# string, for the replacement values of the other commands the user is referred
|
||||
# to HTML_HEADER.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_HEADER =
|
||||
@@ -1667,6 +1711,17 @@ LATEX_HEADER =
|
||||
|
||||
LATEX_FOOTER =
|
||||
|
||||
# The LATEX_EXTRA_STYLESHEET tag can be used to specify additional user-defined
|
||||
# LaTeX style sheets that are included after the standard style sheets created
|
||||
# by doxygen. Using this option one can overrule certain style aspects. Doxygen
|
||||
# will copy the style sheet files to the output directory.
|
||||
# Note: The order of the extra style sheet files is of importance (e.g. the last
|
||||
# style sheet in the list overrules the setting of the previous ones in the
|
||||
# list).
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_EXTRA_STYLESHEET =
|
||||
|
||||
# The LATEX_EXTRA_FILES tag can be used to specify one or more extra images or
|
||||
# other source files which should be copied to the LATEX_OUTPUT output
|
||||
# directory. Note that the files will be copied as-is; there are no commands or
|
||||
@@ -1685,7 +1740,7 @@ LATEX_EXTRA_FILES =
|
||||
PDF_HYPERLINKS = YES
|
||||
|
||||
# If the USE_PDFLATEX tag is set to YES, doxygen will use pdflatex to generate
|
||||
# the PDF file directly from the LaTeX files. Set this option to YES to get a
|
||||
# the PDF file directly from the LaTeX files. Set this option to YES, to get a
|
||||
# higher quality PDF documentation.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
@@ -1726,11 +1781,19 @@ LATEX_SOURCE_CODE = NO
|
||||
|
||||
LATEX_BIB_STYLE = plain
|
||||
|
||||
# If the LATEX_TIMESTAMP tag is set to YES then the footer of each generated
|
||||
# page will contain the date and time when the page was generated. Setting this
|
||||
# to NO can help when comparing the output of multiple runs.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_LATEX is set to YES.
|
||||
|
||||
LATEX_TIMESTAMP = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the RTF output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_RTF tag is set to YES doxygen will generate RTF output. The
|
||||
# If the GENERATE_RTF tag is set to YES, doxygen will generate RTF output. The
|
||||
# RTF output is optimized for Word 97 and may not look too pretty with other RTF
|
||||
# readers/editors.
|
||||
# The default value is: NO.
|
||||
@@ -1745,7 +1808,7 @@ GENERATE_RTF = NO
|
||||
|
||||
RTF_OUTPUT = rtf
|
||||
|
||||
# If the COMPACT_RTF tag is set to YES doxygen generates more compact RTF
|
||||
# If the COMPACT_RTF tag is set to YES, doxygen generates more compact RTF
|
||||
# documents. This may be useful for small projects and may help to save some
|
||||
# trees in general.
|
||||
# The default value is: NO.
|
||||
@@ -1782,11 +1845,21 @@ RTF_STYLESHEET_FILE =
|
||||
|
||||
RTF_EXTENSIONS_FILE =
|
||||
|
||||
# If the RTF_SOURCE_CODE tag is set to YES then doxygen will include source code
|
||||
# with syntax highlighting in the RTF output.
|
||||
#
|
||||
# Note that which sources are shown also depends on other settings such as
|
||||
# SOURCE_BROWSER.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag GENERATE_RTF is set to YES.
|
||||
|
||||
RTF_SOURCE_CODE = NO
|
||||
|
||||
#---------------------------------------------------------------------------
|
||||
# Configuration options related to the man page output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_MAN tag is set to YES doxygen will generate man pages for
|
||||
# If the GENERATE_MAN tag is set to YES, doxygen will generate man pages for
|
||||
# classes and files.
|
||||
# The default value is: NO.
|
||||
|
||||
@@ -1830,7 +1903,7 @@ MAN_LINKS = NO
|
||||
# Configuration options related to the XML output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_XML tag is set to YES doxygen will generate an XML file that
|
||||
# If the GENERATE_XML tag is set to YES, doxygen will generate an XML file that
|
||||
# captures the structure of the code including all documentation.
|
||||
# The default value is: NO.
|
||||
|
||||
@@ -1844,7 +1917,7 @@ GENERATE_XML = NO
|
||||
|
||||
XML_OUTPUT = xml
|
||||
|
||||
# If the XML_PROGRAMLISTING tag is set to YES doxygen will dump the program
|
||||
# If the XML_PROGRAMLISTING tag is set to YES, doxygen will dump the program
|
||||
# listings (including syntax highlighting and cross-referencing information) to
|
||||
# the XML output. Note that enabling this will significantly increase the size
|
||||
# of the XML output.
|
||||
@@ -1857,7 +1930,7 @@ XML_PROGRAMLISTING = YES
|
||||
# Configuration options related to the DOCBOOK output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_DOCBOOK tag is set to YES doxygen will generate Docbook files
|
||||
# If the GENERATE_DOCBOOK tag is set to YES, doxygen will generate Docbook files
|
||||
# that can be used to generate PDF.
|
||||
# The default value is: NO.
|
||||
|
||||
@@ -1871,7 +1944,7 @@ GENERATE_DOCBOOK = NO
|
||||
|
||||
DOCBOOK_OUTPUT = docbook
|
||||
|
||||
# If the DOCBOOK_PROGRAMLISTING tag is set to YES doxygen will include the
|
||||
# If the DOCBOOK_PROGRAMLISTING tag is set to YES, doxygen will include the
|
||||
# program listings (including syntax highlighting and cross-referencing
|
||||
# information) to the DOCBOOK output. Note that enabling this will significantly
|
||||
# increase the size of the DOCBOOK output.
|
||||
@@ -1884,10 +1957,10 @@ DOCBOOK_PROGRAMLISTING = NO
|
||||
# Configuration options for the AutoGen Definitions output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_AUTOGEN_DEF tag is set to YES doxygen will generate an AutoGen
|
||||
# Definitions (see http://autogen.sf.net) file that captures the structure of
|
||||
# the code including all documentation. Note that this feature is still
|
||||
# experimental and incomplete at the moment.
|
||||
# If the GENERATE_AUTOGEN_DEF tag is set to YES, doxygen will generate an
|
||||
# AutoGen Definitions (see http://autogen.sf.net) file that captures the
|
||||
# structure of the code including all documentation. Note that this feature is
|
||||
# still experimental and incomplete at the moment.
|
||||
# The default value is: NO.
|
||||
|
||||
GENERATE_AUTOGEN_DEF = NO
|
||||
@@ -1896,7 +1969,7 @@ GENERATE_AUTOGEN_DEF = NO
|
||||
# Configuration options related to the Perl module output
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the GENERATE_PERLMOD tag is set to YES doxygen will generate a Perl module
|
||||
# If the GENERATE_PERLMOD tag is set to YES, doxygen will generate a Perl module
|
||||
# file that captures the structure of the code including all documentation.
|
||||
#
|
||||
# Note that this feature is still experimental and incomplete at the moment.
|
||||
@@ -1904,7 +1977,7 @@ GENERATE_AUTOGEN_DEF = NO
|
||||
|
||||
GENERATE_PERLMOD = NO
|
||||
|
||||
# If the PERLMOD_LATEX tag is set to YES doxygen will generate the necessary
|
||||
# If the PERLMOD_LATEX tag is set to YES, doxygen will generate the necessary
|
||||
# Makefile rules, Perl scripts and LaTeX code to be able to generate PDF and DVI
|
||||
# output from the Perl module output.
|
||||
# The default value is: NO.
|
||||
@@ -1912,9 +1985,9 @@ GENERATE_PERLMOD = NO
|
||||
|
||||
PERLMOD_LATEX = NO
|
||||
|
||||
# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be nicely
|
||||
# If the PERLMOD_PRETTY tag is set to YES, the Perl module output will be nicely
|
||||
# formatted so it can be parsed by a human reader. This is useful if you want to
|
||||
# understand what is going on. On the other hand, if this tag is set to NO the
|
||||
# understand what is going on. On the other hand, if this tag is set to NO, the
|
||||
# size of the Perl module output will be much smaller and Perl will parse it
|
||||
# just the same.
|
||||
# The default value is: YES.
|
||||
@@ -1934,14 +2007,14 @@ PERLMOD_MAKEVAR_PREFIX =
|
||||
# Configuration options related to the preprocessor
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the ENABLE_PREPROCESSING tag is set to YES doxygen will evaluate all
|
||||
# If the ENABLE_PREPROCESSING tag is set to YES, doxygen will evaluate all
|
||||
# C-preprocessor directives found in the sources and include files.
|
||||
# The default value is: YES.
|
||||
|
||||
ENABLE_PREPROCESSING = YES
|
||||
|
||||
# If the MACRO_EXPANSION tag is set to YES doxygen will expand all macro names
|
||||
# in the source code. If set to NO only conditional compilation will be
|
||||
# If the MACRO_EXPANSION tag is set to YES, doxygen will expand all macro names
|
||||
# in the source code. If set to NO, only conditional compilation will be
|
||||
# performed. Macro expansion can be done in a controlled way by setting
|
||||
# EXPAND_ONLY_PREDEF to YES.
|
||||
# The default value is: NO.
|
||||
@@ -1957,7 +2030,7 @@ MACRO_EXPANSION = YES
|
||||
|
||||
EXPAND_ONLY_PREDEF = NO
|
||||
|
||||
# If the SEARCH_INCLUDES tag is set to YES the includes files in the
|
||||
# If the SEARCH_INCLUDES tag is set to YES, the include files in the
|
||||
# INCLUDE_PATH will be searched if a #include is found.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag ENABLE_PREPROCESSING is set to YES.
|
||||
@@ -2036,20 +2109,21 @@ TAGFILES =
|
||||
|
||||
GENERATE_TAGFILE =
|
||||
|
||||
# If the ALLEXTERNALS tag is set to YES all external class will be listed in the
|
||||
# class index. If set to NO only the inherited external classes will be listed.
|
||||
# If the ALLEXTERNALS tag is set to YES, all external class will be listed in
|
||||
# the class index. If set to NO, only the inherited external classes will be
|
||||
# listed.
|
||||
# The default value is: NO.
|
||||
|
||||
ALLEXTERNALS = NO
|
||||
|
||||
# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed in
|
||||
# the modules index. If set to NO, only the current project's groups will be
|
||||
# If the EXTERNAL_GROUPS tag is set to YES, all external groups will be listed
|
||||
# in the modules index. If set to NO, only the current project's groups will be
|
||||
# listed.
|
||||
# The default value is: YES.
|
||||
|
||||
EXTERNAL_GROUPS = YES
|
||||
|
||||
# If the EXTERNAL_PAGES tag is set to YES all external pages will be listed in
|
||||
# If the EXTERNAL_PAGES tag is set to YES, all external pages will be listed in
|
||||
# the related pages index. If set to NO, only the current project's pages will
|
||||
# be listed.
|
||||
# The default value is: YES.
|
||||
@@ -2066,7 +2140,7 @@ PERL_PATH = /usr/bin/perl
|
||||
# Configuration options related to the dot tool
|
||||
#---------------------------------------------------------------------------
|
||||
|
||||
# If the CLASS_DIAGRAMS tag is set to YES doxygen will generate a class diagram
|
||||
# If the CLASS_DIAGRAMS tag is set to YES, doxygen will generate a class diagram
|
||||
# (in HTML and LaTeX) for classes with base or super classes. Setting the tag to
|
||||
# NO turns the diagrams off. Note that this option also works with HAVE_DOT
|
||||
# disabled, but it is recommended to install and use dot, since it yields more
|
||||
@@ -2091,7 +2165,7 @@ MSCGEN_PATH =
|
||||
|
||||
DIA_PATH =
|
||||
|
||||
# If set to YES, the inheritance and collaboration graphs will hide inheritance
|
||||
# If set to YES the inheritance and collaboration graphs will hide inheritance
|
||||
# and usage relations if the target is undocumented or is not a class.
|
||||
# The default value is: YES.
|
||||
|
||||
@@ -2164,7 +2238,7 @@ COLLABORATION_GRAPH = YES
|
||||
|
||||
GROUP_GRAPHS = YES
|
||||
|
||||
# If the UML_LOOK tag is set to YES doxygen will generate inheritance and
|
||||
# If the UML_LOOK tag is set to YES, doxygen will generate inheritance and
|
||||
# collaboration diagrams in a style similar to the OMG's Unified Modeling
|
||||
# Language.
|
||||
# The default value is: NO.
|
||||
@@ -2216,7 +2290,8 @@ INCLUDED_BY_GRAPH = YES
|
||||
#
|
||||
# Note that enabling this option will significantly increase the time of a run.
|
||||
# So in most cases it will be better to enable call graphs for selected
|
||||
# functions only using the \callgraph command.
|
||||
# functions only using the \callgraph command. Disabling a call graph can be
|
||||
# accomplished by means of the command \hidecallgraph.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
@@ -2227,7 +2302,8 @@ CALL_GRAPH = NO
|
||||
#
|
||||
# Note that enabling this option will significantly increase the time of a run.
|
||||
# So in most cases it will be better to enable caller graphs for selected
|
||||
# functions only using the \callergraph command.
|
||||
# functions only using the \callergraph command. Disabling a caller graph can be
|
||||
# accomplished by means of the command \hidecallergraph.
|
||||
# The default value is: NO.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
@@ -2250,13 +2326,17 @@ GRAPHICAL_HIERARCHY = YES
|
||||
DIRECTORY_GRAPH = YES
|
||||
|
||||
# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images
|
||||
# generated by dot.
|
||||
# generated by dot. For an explanation of the image formats see the section
|
||||
# output formats in the documentation of the dot tool (Graphviz (see:
|
||||
# http://www.graphviz.org/)).
|
||||
# Note: If you choose svg you need to set HTML_FILE_EXTENSION to xhtml in order
|
||||
# to make the SVG files visible in IE 9+ (other browsers do not have this
|
||||
# requirement).
|
||||
# Possible values are: png, png:cairo, png:cairo:cairo, png:cairo:gd, png:gd,
|
||||
# png:gd:gd, jpg, jpg:cairo, jpg:cairo:gd, jpg:gd, jpg:gd:gd, gif, gif:cairo,
|
||||
# gif:cairo:gd, gif:gd, gif:gd:gd and svg.
|
||||
# gif:cairo:gd, gif:gd, gif:gd:gd, svg, png:gd, png:gd:gd, png:cairo,
|
||||
# png:cairo:gd, png:cairo:cairo, png:cairo:gdiplus, png:gdiplus and
|
||||
# png:gdiplus:gdiplus.
|
||||
# The default value is: png.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
@@ -2304,10 +2384,19 @@ DIAFILE_DIRS =
|
||||
# PlantUML is not used or called during a preprocessing step. Doxygen will
|
||||
# generate a warning when it encounters a \startuml command in this case and
|
||||
# will not generate output for the diagram.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
PLANTUML_JAR_PATH =
|
||||
|
||||
# When using plantuml, the PLANTUML_CFG_FILE tag can be used to specify a
|
||||
# configuration file for plantuml.
|
||||
|
||||
PLANTUML_CFG_FILE =
|
||||
|
||||
# When using plantuml, the specified paths are searched for files specified by
|
||||
# the !include statement in a plantuml block.
|
||||
|
||||
PLANTUML_INCLUDE_PATH =
|
||||
|
||||
# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of nodes
|
||||
# that will be shown in the graph. If the number of nodes in a graph becomes
|
||||
# larger than this value, doxygen will truncate the graph, which is visualized
|
||||
@@ -2344,7 +2433,7 @@ MAX_DOT_GRAPH_DEPTH = 0
|
||||
|
||||
DOT_TRANSPARENT = NO
|
||||
|
||||
# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output
|
||||
# Set the DOT_MULTI_TARGETS tag to YES to allow dot to generate multiple output
|
||||
# files in one run (i.e. multiple -o and -T options on the command line). This
|
||||
# makes dot run faster, but since only newer versions of dot (>1.8.10) support
|
||||
# this, this feature is disabled by default.
|
||||
@@ -2361,7 +2450,7 @@ DOT_MULTI_TARGETS = YES
|
||||
|
||||
GENERATE_LEGEND = YES
|
||||
|
||||
# If the DOT_CLEANUP tag is set to YES doxygen will remove the intermediate dot
|
||||
# If the DOT_CLEANUP tag is set to YES, doxygen will remove the intermediate dot
|
||||
# files that are used to generate the various graphs.
|
||||
# The default value is: YES.
|
||||
# This tag requires that the tag HAVE_DOT is set to YES.
|
||||
|
||||
@@ -24,6 +24,10 @@ Here you can find information on how to build projects using the %OpenMesh libra
|
||||
as well as further information on mesh handling in %OpenMesh.
|
||||
The tutorials explain how to use %OpenMesh by demonstrating real code examples.
|
||||
|
||||
\section openmesh-python OpenMesh Python Bindings
|
||||
We also provide python bindings for %OpenMesh. You can find them here:<br/>
|
||||
<tt>https://www.graphics.rwth-aachen.de:9000/OpenMesh/openmesh-python</tt>
|
||||
|
||||
\section iov Building OpenMesh
|
||||
In this section all necessary information on how to build projects using %OpenMesh
|
||||
is given.
|
||||
@@ -78,20 +82,14 @@ repeatedly replacing each vertex' position by the center of gravity
|
||||
\li \ref tutorial_02
|
||||
\li \ref tutorial_03
|
||||
\li \ref tutorial_04
|
||||
\li \ref tutorial_11
|
||||
\li \ref tutorial_05
|
||||
\li \ref tutorial_06
|
||||
\li \ref tutorial_07
|
||||
\li \ref tutorial_07b
|
||||
\li \ref tutorial_08
|
||||
\li \ref tutorial_09
|
||||
|
||||
<br /><br />
|
||||
|
||||
\section python_and_om OpenMesh Python interface
|
||||
OpenMesh itself is written in C++. We also provide a python interface
|
||||
to use OpenMesh. A detailed description of the interface can be found
|
||||
in the following tutorial:
|
||||
\li \subpage python_tutorial
|
||||
\li \ref tutorial_10
|
||||
|
||||
<br /><br />
|
||||
|
||||
@@ -113,6 +111,7 @@ in the following tutorial:
|
||||
\li \subpage mesh_operations
|
||||
\li \subpage mesh_hierarchy
|
||||
\li \subpage mesh_type
|
||||
\li \subpage mesh_eigen
|
||||
|
||||
|
||||
\page additional_information Additional Information on OpenMesh
|
||||
|
||||
@@ -555,6 +555,45 @@ curvature, i.e. vertex color.
|
||||
|
||||
That's it.
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
/** \page mesh_eigen Specifying an OpenMesh using Eigen3 vectors
|
||||
|
||||
This section will show how to build your own custom mesh type using
|
||||
Eigen3 vectors for points, normals or other entities.
|
||||
|
||||
First of all you need to include the Eigen header shipped with OpenMesh:
|
||||
\code
|
||||
#include <OpenMesh/Core/Geometry/EigenVectorT.hh>
|
||||
\endcode
|
||||
|
||||
This header contains the external functions and vector traits used by
|
||||
OpenMesh.
|
||||
|
||||
Afterwards you can specify your mesh:
|
||||
|
||||
\code
|
||||
struct EigenTraits : OpenMesh::DefaultTraits {
|
||||
using Point = Eigen::Vector3d;
|
||||
using Normal = Eigen::Vector3d;
|
||||
|
||||
using TexCoord2D = Eigen::Vector2d;
|
||||
};
|
||||
|
||||
using EigenTriMesh = OpenMesh::TriMesh_ArrayKernelT<EigenTraits>;
|
||||
|
||||
EigenTriMesh mesh;
|
||||
|
||||
\endcode
|
||||
|
||||
Now you can use mesh as any other OpenMesh while using Eigen vectors
|
||||
as the underlying data type.
|
||||
|
||||
\note OpenMesh uses stl vectors for storing its data. This might lead to errors
|
||||
regarding memory alignment with sse instructions:
|
||||
http://eigen.tuxfamily.org/dox/group__TopicStlContainers.html
|
||||
You might need to define -DEIGEN_DONT_VECTORIZE
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
164
Doc/misc.docu
164
Doc/misc.docu
@@ -7,6 +7,7 @@ The following naming conventions are used for the %OpenMesh code:
|
||||
|
||||
<b>Files:</b>
|
||||
\li \c MyClass.cc for C++-Implementation of class \c MyClass
|
||||
\li \c MyClassT_impl.hh for Header only C++-Implementation of template class \c MyClass
|
||||
\li \c MyClass.hh for C++-Header of class \c MyClass
|
||||
|
||||
<b>Classes:</b>
|
||||
@@ -27,167 +28,4 @@ The following naming conventions are used for the %OpenMesh code:
|
||||
|
||||
**/
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
|
||||
/** \page compiling Compiling OpenMesh
|
||||
|
||||
\section compilers Tested compilers
|
||||
|
||||
%OpenMesh has been successfully tested for the following operating
|
||||
systems / compilers. This is only a list of tested compilers. More might be supported but are not tested.
|
||||
|
||||
<table>
|
||||
|
||||
<tr><td> Linux </td><td>
|
||||
gcc 4.6.x<br>
|
||||
gcc 4.7.x<br>
|
||||
gcc 4.8.x<br>
|
||||
gcc 4.9.x<br>
|
||||
clang 3.3<br>
|
||||
clang 3.4<br>
|
||||
</td></tr>
|
||||
|
||||
<tr><td> Windows </td><td>
|
||||
Microsoft Visual Studio 2008<br>
|
||||
Microsoft Visual Studio 2010<br>
|
||||
Microsoft Visual Studio 2012<br>
|
||||
Microsoft Visual Studio 2013<br>
|
||||
Microsoft Visual Studio 2015<br>
|
||||
</td></tr>
|
||||
|
||||
<tr><td> Tested MacOS X Compilers</td>
|
||||
<td>
|
||||
XCode 4.3 <br>
|
||||
XCode 4.4 <br>
|
||||
XCode 4.5 <br>
|
||||
XCode 5.1.1 <br>
|
||||
Apple LLVM version 5.1 (clang-503.0.40) (based on LLVM 3.4svn) <br>
|
||||
</td></tr>
|
||||
|
||||
</table>
|
||||
|
||||
\section req_libs Required libraries (Only for included Apps)
|
||||
|
||||
Install the following external libraries / frameworks if you want to use the included Applications:<br><br>
|
||||
<table>
|
||||
<tr><td>Qt4/Qt5</td><td><a href="http://qt-project.org/downloads" target="_blank">http://qt-project.org/downloads</a></td></tr>
|
||||
</table><br>
|
||||
|
||||
\section build_systems Chosing build system
|
||||
|
||||
%OpenMesh can be built using the <b>cmake</b> build system.
|
||||
<br>
|
||||
<br>
|
||||
|
||||
\section sec_compiling_unix Unix
|
||||
|
||||
\subsection linux_using_cmake Compiling OpenMesh using CMake
|
||||
|
||||
In order to compile %OpenMesh, create a directory named e.g. "build" in
|
||||
OpenMesh's root directory. <b>Change to the newly created directory</b> and type
|
||||
<br/><br/>
|
||||
<tt>
|
||||
cmake .. ## Generates the appropriate Makefiles<br>
|
||||
make ## Builds the project<br>
|
||||
</tt><br>
|
||||
You can choose the build type by using cmake with the flag<br>
|
||||
<b>-DCMAKE_BUILD_TYPE=(Debug|Release)</b><br>
|
||||
The default is: Debug
|
||||
<br>
|
||||
Other flags are:<br/>
|
||||
<b>-DBUILD_APPS=OFF</b> to disable build of applications and<br/>
|
||||
<b>-DCMAKE_INSTALL_PREFIX=<path></b> to specify the install path.
|
||||
<br/>
|
||||
When calling <b>make install</b> cmake will install %OpenMesh into this
|
||||
directory using the subdirectories lib/include/bin.
|
||||
|
||||
CMake builds both shared and static under Linux.
|
||||
|
||||
Everything will then be build in the <b>Build</b> subdirectory containing the libraries in <b>lib</b> and the binaries in <b>bin</b>.
|
||||
|
||||
There are some additional targets:<br>
|
||||
<b>doc</b>: Builds the Documentation<br>
|
||||
<b>doc-install</b>: Builds the Documentation and installs it<br>
|
||||
<br>
|
||||
\note When you link against the static libraries of OpenMesh and get the error "can not be used when making a
|
||||
shared object; recompile with -fPIC" you need to add "-fPIC" to the CMAKE_CXX_FLAGS. (This is usually added automatically)
|
||||
|
||||
\section sec_compiling_windows Windows
|
||||
|
||||
\subsection windows_using_cmake Compiling OpenMesh using CMake
|
||||
|
||||
If you want to use cmake to build your Visual Studio 2008 solution file,<br>
|
||||
download and install CMake from <a href="http://www.cmake.org/cmake/resources/software.html">www.cmake.org</a>.<br>
|
||||
(Note: This is not mandatory since there are already VS2008 solution files included in %OpenMesh).<br><br>
|
||||
<ul>
|
||||
<li> Get Visual Studio ( 2008-2013 ) </li>
|
||||
<li> Extract %OpenMesh source code. </li>
|
||||
<li> Get all required libraries and install them ( including headers! ).</li>
|
||||
<li> Get cmake for windows from http://www.cmake.org/cmake/resources/software.html </li>
|
||||
<li> Start the cmake gui and open the %OpenMesh toplevel directory as source directory </li>
|
||||
<li> Choose a build directory (e.g. create a directory called "build" in OpenMesh's root folder) </li>
|
||||
<li> Click on configure .... If any libraries are left unconfigured, you can adjust the path manually. Rerun configure until everything is configured correctly.
|
||||
Attention: Some build variables are only visible in advanced view mode. Select Visual Studio 9 (2008), Visual Studio 10(2010), Visual Studio 11 (2012), Visual Studio 12 (2013) (Depending on your version) as
|
||||
generator. </li>
|
||||
<li> Click generate to create the visual studio project files </li>
|
||||
<li> You can now find a Visual Studio solution file (OpenMesh.sln) in the <b>build</b> directory you chose in cmake </li>
|
||||
<li> Now you can build %OpenMesh from within Visual Studio using the newly created project file. </li>
|
||||
</ul>
|
||||
|
||||
Note: Set the CMAKE_BUILD_TYPE variable to "Release" if you want %OpenMesh to be built as release.
|
||||
In Visual Studio choose "Release" in the appropriate select box and build the solution afterwards.
|
||||
|
||||
<br>
|
||||
<br>
|
||||
|
||||
\section sec_compiling_macosx MacOS X
|
||||
|
||||
Download and install required libraries as stated above.
|
||||
You can download %OpenMesh's sources from <tt>www.openmesh.org</tt> or check out the latest repository via SVN:<br/>
|
||||
<tt>svn co http://www.openmesh.org/svnrepo/OpenMesh/trunk %OpenMesh</tt>.<br/><br/>
|
||||
|
||||
\subsection mac_using_cmake Compiling OpenMesh using CMake
|
||||
|
||||
We recommend you to use CMake >= 2.8 as build system. This can also easily be installed
|
||||
via MacPorts as well as the Qt >= 4.7 library which is used for some example applications
|
||||
in %OpenMesh.<br/>
|
||||
Once installed, change to %OpenMesh's root directory and create a directory
|
||||
named e.g. "buildDebug" (assuming you want to build with debug symbols).<br/>
|
||||
Then type in the following command to initially set up the build environment:
|
||||
<br/><br/>
|
||||
<tt>
|
||||
cmake .. ## Generates the appropriate Makefiles<br>
|
||||
</tt>
|
||||
<br/>
|
||||
Note: If the build directory is not a subdirectory of %OpenMesh's root folder, replace ".." with %OpenMesh's
|
||||
absolute (or relative) path.
|
||||
In order to manually set specific build variables, just type:
|
||||
<br/><br/>
|
||||
<tt>
|
||||
ccmake . ## Configure build environment<br>
|
||||
</tt>
|
||||
<br/>
|
||||
This opens the CMake configure tool. Change the CMAKE_BUILD_TYPE variable to "Release" in order to prepare build
|
||||
for release configuration. Now, when everything is set up, just type:
|
||||
<br/><br/>
|
||||
<tt>
|
||||
make ## Build %OpenMesh<br>
|
||||
</tt>
|
||||
<br/>
|
||||
And optionally:
|
||||
<br/><br/>
|
||||
<tt>
|
||||
make doc ## Build %OpenMesh's documentation<br>
|
||||
</tt>
|
||||
<br>
|
||||
The mac application bundle will be found under "Build" in the recently created build folder.
|
||||
It automatically contains all needed shared objects (libs, fonts, textures, etc.).
|
||||
|
||||
CMake builds both shared and static under MacOS X.
|
||||
|
||||
**/
|
||||
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
@@ -1,288 +0,0 @@
|
||||
/** \page python_tutorial Python Tutorial
|
||||
|
||||
This tutorial will introduce the basic concepts behind the %OpenMesh Python
|
||||
Bindings. We will cover the following topics:
|
||||
|
||||
\li How to build the Python Bindings
|
||||
\li How to create an empty mesh
|
||||
\li How to add vertices and faces to a mesh
|
||||
\li How to navigate on a mesh using iterators and circulators
|
||||
\li How to add and remove custom properties
|
||||
\li How to read and write meshes from files
|
||||
|
||||
In addition, we will briefly discuss some of the differences between the Python
|
||||
Bindings and the original C++ implementation of %OpenMesh.
|
||||
|
||||
|
||||
|
||||
\section python_build Building the Python Bindings
|
||||
|
||||
The Python Bindings depend on the following libraries:
|
||||
|
||||
\li Python (2.7 or later)
|
||||
\li Boost Python (1.54.0 or later)
|
||||
|
||||
\note Make sure that your Boost Python and Python versions match, i.e. that
|
||||
Boost Python was linked against the correct Python version.
|
||||
|
||||
The Python Bindings are automatically built with %OpenMesh. The generated files are written to the
|
||||
Build/python subdirectory of the build tree. For more information on how to build %OpenMesh see
|
||||
\ref compiling.
|
||||
|
||||
If CMake does not find your Python installation (or finds the wrong one) you can
|
||||
explicitly specify an installation by setting the following variables:
|
||||
|
||||
\verbatim
|
||||
PYTHON_LIBRARY - Path to the python library
|
||||
PYTHON_INCLUDE_DIR - Path to where Python.h is found
|
||||
\endverbatim
|
||||
|
||||
Similarly, if CMake does not find your Boost Python installation, set the
|
||||
following variables:
|
||||
|
||||
\verbatim
|
||||
BOOST_ROOT - Preferred installation prefix
|
||||
BOOST_INCLUDEDIR - Preferred include directory e.g. <prefix>/include
|
||||
BOOST_LIBRARYDIR - Preferred library directory e.g. <prefix>/lib
|
||||
\endverbatim
|
||||
|
||||
|
||||
|
||||
\section python_start Getting Started
|
||||
|
||||
To use the %OpenMesh Python Bindings we first need to import the openmesh module:
|
||||
|
||||
\dontinclude python_tutorial.py
|
||||
\skipline from
|
||||
|
||||
The module provides two mesh classes: One for polygonal meshes (PolyMesh) and
|
||||
one for triangle meshes (TriMesh). You should use triangle meshes whenever
|
||||
possible, since they are usually more efficient. In addition, some algorithms
|
||||
are only implemented for triangle meshes while triangle meshes inherit the full
|
||||
functionality of polygonal meshes.
|
||||
|
||||
The following code creates a new triangle mesh:
|
||||
|
||||
\skipline mesh
|
||||
|
||||
|
||||
|
||||
\section python_add Adding Items to a Mesh
|
||||
|
||||
We can add a new vertex to the mesh by calling the add_vertex() member function.
|
||||
This function gets a coordinate and returns a handle to the newly inserted
|
||||
vertex.
|
||||
|
||||
\skipline vh0
|
||||
\until vh4
|
||||
|
||||
To add a new face to the mesh we have to call add_face(). This function gets the
|
||||
handles of the vertices that make up the new face and returns a handle to the
|
||||
newly inserted face:
|
||||
|
||||
\skipline fh0
|
||||
\until fh2
|
||||
|
||||
We can also use a Python list to add a face to the mesh:
|
||||
|
||||
\skipline vh_list
|
||||
\until fh3
|
||||
|
||||
|
||||
|
||||
\section python_iterators Iterators and Circulators
|
||||
|
||||
Now that we have added a couple of vertices to the mesh, we can iterate over
|
||||
them and print out their indices:
|
||||
|
||||
\skipline for
|
||||
\until vh.idx()
|
||||
|
||||
We can also iterate over halfedges, edges and faces by calling mesh.halfedges(),
|
||||
mesh.edges() and mesh.faces() respectively:
|
||||
|
||||
\skipline iterate
|
||||
\until fh.idx()
|
||||
|
||||
To iterate over the items adjacent to another item we can use one of the
|
||||
circulator functions. For example, to iterate over the vertices adjacent to
|
||||
another vertex we can call mesh.vv() and pass the handle of the center vertex:
|
||||
|
||||
\skipline for
|
||||
\until vh.idx()
|
||||
|
||||
We can also iterate over the adjacent halfedges, edges and faces:
|
||||
|
||||
\skipline iterate
|
||||
\until fh.idx()
|
||||
|
||||
To iterate over the items adjacent to a face we can use the following functions:
|
||||
|
||||
\skipline iterate
|
||||
\until fh.idx()
|
||||
|
||||
|
||||
|
||||
\section python_props Properties
|
||||
|
||||
%OpenMesh allows us to dynamically add custom properties to a mesh. We can add
|
||||
properties to vertices, halfedges, edges, faces and the mesh itself. To
|
||||
add a property to a mesh (and later access its value) we have to use a property
|
||||
handle of the appropriate type:
|
||||
|
||||
\li VPropHandle (for vertex properties)
|
||||
\li HPropHandle (for halfedge properties)
|
||||
\li EPropHandle (for edge properties)
|
||||
\li FPropHandle (for face properties)
|
||||
\li MPropHandle (for mesh properties)
|
||||
|
||||
The following code shows how to add a vertex property to a mesh:
|
||||
|
||||
\skipline prop_handle
|
||||
\until mesh
|
||||
|
||||
The second parameter of the function add_property() is optional. The parameter
|
||||
is used to specify a name for the new property. This name can later be used
|
||||
to retrieve a handle to the property using the get_property_handle() member
|
||||
function.
|
||||
|
||||
Now that we have added a vertex property to the mesh we can set and get its
|
||||
value. Here we will use the property to store the center of gravity of each
|
||||
vertex' neighborhood:
|
||||
|
||||
\skipline for
|
||||
\until mesh.set_property
|
||||
|
||||
Properties use Python's type system. This means that we can use the same
|
||||
property to store values of different types (e.g. store both strings and
|
||||
integers using the same vertex property). Properties are initialized to the
|
||||
Python built-in constant None.
|
||||
|
||||
To remove a property we have to call remove_property() with the appropriate
|
||||
property handle:
|
||||
|
||||
\skipline mesh.remove_property
|
||||
|
||||
|
||||
|
||||
\section python_propman Property Managers
|
||||
|
||||
Another way to add and remove a property is to use a property manager. A
|
||||
Property manager encapsulates a property and manages its lifecycle. A Property
|
||||
manager also provides a number of convenience functions to access the enclosed
|
||||
property.
|
||||
|
||||
There are four different types of property managers. One for each type of mesh
|
||||
item:
|
||||
|
||||
\li VPropertyManager (for vertex properties)
|
||||
\li HPropertyManager (for halfedge properties)
|
||||
\li EPropertyManager (for edge properties)
|
||||
\li FPropertyManager (for face properties)
|
||||
|
||||
Property managers automatically add a new property to a mesh when they are
|
||||
initialized. Thus the following code not only creates a new vertex property
|
||||
manager, but also adds a new vertex property to the mesh:
|
||||
|
||||
\skipline prop_man
|
||||
|
||||
Property managers allow us to conveniently set the property value for an entire
|
||||
range of mesh items:
|
||||
|
||||
\skipline prop_man
|
||||
|
||||
They also allow us to use the subscript operator to set and get property values.
|
||||
Here we will once again use a property to store the center of gravity of each
|
||||
vertex' neighborhood:
|
||||
|
||||
\skipline for
|
||||
\until prop_man[vh] /= valence
|
||||
|
||||
Properties that are encapsulated by a property manager are automatically removed
|
||||
from the mesh when the property manager goes out of scope (i.e. the property
|
||||
manager is garbage collected).
|
||||
|
||||
|
||||
|
||||
\section python_io Read and write meshes from files
|
||||
|
||||
You can read and write meshes from files using the read_mesh() and write_mesh()
|
||||
functions:
|
||||
|
||||
\skipline mesh
|
||||
\until write_mesh(mesh, "bunny.obj")
|
||||
|
||||
The file type is automatically deduced from the file extension. %OpenMesh
|
||||
currently supports four file types: .off, .obj, .stl and .om
|
||||
|
||||
The behaviour of the I/O functions can be controlled by passing an instance of
|
||||
the Options class to either read_mesh() or write_mesh(). The class controls the
|
||||
behaviour of the I/O functions by means of enabled/disabled bits in a bitset:
|
||||
|
||||
\skipline mesh
|
||||
\until print "something went wrong"
|
||||
|
||||
Other available option bits include:
|
||||
|
||||
-# mode bits - control binary reading/writing
|
||||
- Options.Binary
|
||||
- Options.MSB
|
||||
- Options.LSB
|
||||
- Options.Swap (MSB|LSB)
|
||||
-# property bits - controls which standard properties to read/write
|
||||
- Options.VertexNormal
|
||||
- Options.VertexTexCoord
|
||||
- Options.VertexColor
|
||||
- Options.FaceNormal
|
||||
- Options.FaceColor
|
||||
- Options.ColorAlpha
|
||||
- Options.ColorFloat
|
||||
|
||||
\note You have to pass an instance of the Options class to the I/O functions,
|
||||
i.e. you cannot directly pass one of the option bits. For example, directly
|
||||
passing Options.Binary to either one of the functions will cause an error.
|
||||
|
||||
When reading a file the options are used as hints, i.e. depending on the format
|
||||
we can help the reader to interpret the data correctly.
|
||||
|
||||
\note If you want to read a property from a file the property must have been
|
||||
requested prior to reading the file.
|
||||
|
||||
When writing the mesh the mode bits control whether to use the binary variant of
|
||||
the respective file format and the desired byte-ordering.
|
||||
|
||||
|
||||
|
||||
\section python_examples Additional Code Examples
|
||||
|
||||
You can use our unit tests to learn more about the %OpenMesh Python Bindings.
|
||||
They are located in the src/Python/Unittests subdirectory.
|
||||
|
||||
|
||||
|
||||
\section python_cpp Python and C++
|
||||
|
||||
The interface of the Python Bindings is to a large extent identical to the
|
||||
interface of the original C++ implementation of %OpenMesh. You should therefore
|
||||
be able to use the C++ documentation as a reference for the Python Bindings. In
|
||||
particular, the classes KernelT, PolyMeshT and TriMeshT provide a good overview
|
||||
of the available mesh member functions. That being said, there are a number of
|
||||
small differences. For example, whenever the C++ implementation returns a
|
||||
reference to an object that is managed by %OpenMesh, the Python Bindings will
|
||||
return a copy of that object. This is due to the fact that Python does not have
|
||||
a language feature that is analogous to C++ references. One example of such a
|
||||
function is the point() member function of the PolyMesh and TriMesh classes.
|
||||
Unlike its C++ counterpart, the function does not return a reference to the
|
||||
requested point. It instead returns a copy of the point. This implies that you
|
||||
have to use the set_point() member function to change the value of a point. The
|
||||
same applies to the following functions: normal(), color(), property(),
|
||||
status(), etc.
|
||||
|
||||
|
||||
|
||||
<br>The complete source looks like this:
|
||||
|
||||
\include python_tutorial.py
|
||||
|
||||
|
||||
**/
|
||||
@@ -6,6 +6,7 @@
|
||||
\li \subpage subdivider_docu
|
||||
\li \subpage vdpm_docu
|
||||
\li \subpage smoother_docu
|
||||
\li \subpage smarttagger_docu
|
||||
\li Miscellaneous
|
||||
OpenMesh::StripifierT
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
/** \page tutorial_03 Using (custom) properties
|
||||
|
||||
This examples shows:
|
||||
- How to add and remove custom properties,
|
||||
- How to add and remove custom properties
|
||||
- How to get and set the value of a custom property
|
||||
|
||||
In the last example we computed the barycenter of each vertex'
|
||||
@@ -11,44 +11,98 @@ let %OpenMesh manage the data.
|
||||
It would be even more helpful if we could attach such properties
|
||||
dynamically to the mesh.
|
||||
|
||||
%OpenMesh provides dynamic properties, which can be attached to each
|
||||
mesh entity (vertex, face, edge, halfedge, and the mesh itself). We
|
||||
distinguish between custom and standard properties. A custom property
|
||||
is any user-defined property and is accessed via the member function
|
||||
\c property(..) via a handle and an entity handle
|
||||
(e.g. VertexHandle). Whereas the standard properties are accessed via
|
||||
special member functions, e.g. the vertex position is accessed with \c
|
||||
point(..) and a vertex handle.
|
||||
Custom properties can be conveniently created and attached to meshes by creating an object of type OpenMesh::PropertyManager. A PropertyManager manages the lifetime of the property and provides read / write access to its values.
|
||||
|
||||
In this example we will store the \c cog-value (see previous example)
|
||||
in an additional vertex property instead of keeping it in a separate
|
||||
array. To do so we define first a so-called property handle with the desired
|
||||
type (\c MyMesh::Point) and register the handle at the mesh:
|
||||
You can use the typedefs VProp, HProp, EProp, FProp, and MProp in order to create a PropertyManager attached to vertices, halfedge, edges, faces and the mesh respectively. Each of these takes as template argument the type of the property value that is attached to each element (e.g., \p int, \p double, etc.).
|
||||
|
||||
We differentiate between two kinds of properties. <em>Named</em> and <em>temporary</em> properties. Temporary properties are created by just providing the constructor with a mesh on which the property should be created. These properties will be removed as soon as the PropertyManager goes out of scope. If in addition to the mesh a property name is provided, a named property will be created which will stay alive even after the PropertyManager goes out of scope. If a PropertyManager is given a name of an already existing property, it will provide read and write access to the same property.
|
||||
|
||||
Finally, an optional first parameter can be given containing a value that will be used to initialize the property for all elements if the property is freshly created (i.e. always for temporary properties, and only the first time a specific name is used).
|
||||
|
||||
|
||||
Here are a few examples of how to create and access mesh properties:
|
||||
|
||||
\code
|
||||
// Add a temporary mesh property that stores a double value for every vertex
|
||||
auto temperature = OpenMesh::VProp<double>(mesh);
|
||||
OpenMesh::VertexHandle vh = ...;
|
||||
temperature[vh] = 1.0;
|
||||
// The temperature property will be removed from the mesh when the handle reaches the end of the scope.
|
||||
|
||||
// Obtain an existing property that stores a 2D vector for every halfedge
|
||||
// (or create that property if it does not exist already) and initilize it with the Vector(1,1))
|
||||
auto uv = OpenMesh::HProp<OpenMesh::Vec2d>(mesh, "uv", OpenMesh::Vec2d(1,1));
|
||||
OpenMesh::VertexHandle heh = ...;
|
||||
std::cout << temperature[heh][0] << " " << temperature[heh][1] << std::endl;
|
||||
|
||||
// Obtain an existing mesh property (or create that property if it does not exist already)
|
||||
// containing a description string
|
||||
auto desc = OpenMesh::MProp<std::string>(mesh, "desc");
|
||||
*desc = "This is a very nice mesh.";
|
||||
\endcode
|
||||
|
||||
---
|
||||
|
||||
## Code Example
|
||||
|
||||
In this example, we will store the \c cog value (see previous example) in a vertex property instead of keeping it in a separate array.
|
||||
To do so, we first add a (temporary) property of the desired element type (OpenMesh::VertexHandle) and value type (\c %MyMesh::Point) to the mesh:
|
||||
|
||||
\dontinclude 03-properties/smooth.cc
|
||||
\skipline vertex property stores
|
||||
\until mesh.add
|
||||
\skipline VProp
|
||||
|
||||
<br>The \c mesh allocates enough memory to hold as many elements of type
|
||||
\c MyMesh::Point as number of vertices exist, and of course the mesh
|
||||
synchronizes all insert and delete operations on the vertices with the
|
||||
vertex properties.
|
||||
Enough memory is allocated to hold as many values of \c %MyMesh::Point as there are vertices.
|
||||
All insert and delete operations on the mesh are synchronized with the attached properties.
|
||||
|
||||
Once the wanted property is registered we can use the property to
|
||||
calculate the barycenter of the neighborhood of each vertex \c v_it
|
||||
Once the property is created, we can use it to compute the centers of the neighborhood of each vertex:
|
||||
|
||||
\dontinclude 03-properties/smooth.cc
|
||||
\skipline vv_it=
|
||||
\skipline mesh.vertices
|
||||
\until cog[vh] /= valence
|
||||
\until }
|
||||
\until mesh.prop
|
||||
|
||||
<br>and finally set the new position for each vertex \c v_it
|
||||
Finally, we set the new position for each vertex:
|
||||
|
||||
\dontinclude 03-properties/smooth.cc
|
||||
\skipline mesh.set_point
|
||||
\skipline mesh.vertices
|
||||
\until mesh.point
|
||||
\until }
|
||||
|
||||
<br>Below is the complete source code:
|
||||
Below is the complete source code:
|
||||
|
||||
\include 03-properties/smooth.cc
|
||||
|
||||
---
|
||||
|
||||
## Property Lifetime
|
||||
|
||||
In the above example, we chose to use VProp without a name. This causes the created property to automatically be removed from the mesh as soon as we leave the scope of the associated handle variable \c cog.
|
||||
|
||||
If, instead, a property is desired to survive its local scope, it should be created with a name. For example:
|
||||
|
||||
\code
|
||||
auto face_area = OpenMesh::FProp<double>(mesh, "face_area");
|
||||
\endcode
|
||||
|
||||
At a later time, we can access the same property by using the same name. If we want to make sure, that we access a property that has already been created earlier, we can use hasProperty() to test whether a mesh has the desired property:
|
||||
\code
|
||||
if (OpenMesh::hasProperty<OpenMesh::FaceHandle, double>(mesh, "face_area")) {
|
||||
// Property exists. Do something with it.
|
||||
auto valley = OpenMesh::FProp<bool>(mesh, "face_area");
|
||||
}
|
||||
else {
|
||||
// Property does not exist. Do something else.
|
||||
}
|
||||
\endcode
|
||||
|
||||
---
|
||||
|
||||
## Low-Level Property API
|
||||
|
||||
The property managers VProp, HProp, EProp, FProp and MProp are the convenient high-level interface for creating and accessing mesh properties.
|
||||
|
||||
Beneath these convenience functions, there is also a low-level property interface where handle and property lifetime must be managed manually. This interface is accessed through a mesh's add_property(), get_property(), remove_property(), and property() functions and several property handle classes (OpenMesh::VPropHandleT, OpenMesh::HPropHandleT, OpenMesh::EPropHandleT, OpenMesh::FPropHandleT, OpenMesh::MPropHandleT).
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
*/
|
||||
@@ -55,7 +55,7 @@ ASCII is not a real option and will be selected, if binary was not defined.
|
||||
<TR><TH>Format/Option<TD>ASCII<TD>Binary<TD>MSB<TD>LSB<TD>Swap<TD>VertexNormal<TD>VertexColor<TD>VertexTexCoord<TD>EdgeColor<TD>FaceNormal<TD>FaceColor<TD>FaceTexCoord<TD>ColorAlpha<TD>ColorFloat<TD>Custom
|
||||
<TR><TH>OBJ<TD>x<TD> <TD> <TD> <TD> <TD>x<TD>x *)<TD>x<TD> <TD>x<TD>x<TD>x<TD><TD><TD>
|
||||
<TR><TH>OFF<TD>x<TD>x<TD> <TD>x<TD> <TD>x<TD>x<TD>x<TD> <TD> <TD>x<TD> <TD>x<TD>x<TD>
|
||||
<TR><TH>PLY<TD>x<TD>x<TD>x<TD>x<TD> <TD>x<TD>x<TD>x<TD> <TD> <TD> <TD> <TD>x<TD>x<TD>x **)
|
||||
<TR><TH>PLY<TD>x<TD>x<TD>x<TD>x<TD> <TD>x<TD>x<TD>x<TD> <TD> <TD>x<TD> <TD>x<TD>x<TD>x **)
|
||||
<TR><TH>OM<TD> <TD>x<TD>x<TD>x<TD>x<TD>x<TD>x<TD>x<TD><TD>x<TD>x<TD><TD><TD><TD>x (\ref tutorial_09 )
|
||||
<TR><TH>STL<TD>x<TD>x<TD><TD>x<TD><TD><TD><TD><TD><TD>x<TD><TD><TD><TD><TD>
|
||||
<TR><TH>VTK ***)<TD>x<TD><TD><TD><TD><TD><TD><TD><TD><TD><TD><TD><TD><TD><TD>
|
||||
|
||||
@@ -1,186 +1,84 @@
|
||||
/** \page tutorial_09 Storing custom properties
|
||||
/** \page tutorial_09 Using custom properties (old style)
|
||||
|
||||
The %OpenMesh' proprietary OM format allows to store and restore
|
||||
custom properties along with the standard properties. For it we have
|
||||
to use named custom properties like the following one
|
||||
This small code example shows how to attach and access additional properties on a mesh.
|
||||
|
||||
\dontinclude 09-persistence/persistence.cc
|
||||
\skipline VPropHandleT
|
||||
\skipline mesh.add_property
|
||||
<em>Note that this is an old style of using properties. Nowadays you should use the OpenMesh::PropertyManager instead.</em>
|
||||
|
||||
Here we registered a float property for the vertices at the mesh with
|
||||
name "vprop_float". The name of a property, that we want to make
|
||||
persistent, must follow a few rules
|
||||
When you want to add an additional properties you have to attach it to a primitive of the
|
||||
mesh. You can attach to verticies, halfedges, edges, faces or to the mesh itself. Use the
|
||||
add_property function:
|
||||
|
||||
-# max. 256 characters long
|
||||
-# The prefixes \c "v:", \c "h:", \c "e:", \c "f:" and \c "m:" are reserved.
|
||||
\code
|
||||
|
||||
If we stick to this rules we are fine. Furthermore we have to
|
||||
consider, that the names are handled case-sensitive.
|
||||
// for each vertex an extra double value
|
||||
OpenMesh::VPropHandleT< double > vprop_double;
|
||||
mesh.add_property( vprop_double ,"Vertex property name");
|
||||
|
||||
To actually make a custom property persistent we have to set the
|
||||
persistent flag in the property with
|
||||
// for each halfedge an extra int value
|
||||
OpenMesh::HEPropHandleT< int > heprop_int;
|
||||
mesh.add_property( heprop_int ,"Halfedge property name");
|
||||
|
||||
\skipline mesh.property(vprop_float).set_persistent
|
||||
// for each edge an extra float value
|
||||
OpenMesh::EPropHandleT< float > eprop_float;
|
||||
mesh.add_property( eprop_float ,"Edge property name");
|
||||
|
||||
Now we can use \c IO::mesh_write() to write the mesh to a file on
|
||||
disk. The custom properties are added after the standard properties
|
||||
in the file, with the name and it's binary size. These two pieces of
|
||||
information are evaluated when reading the file again. To successfully
|
||||
restore the custom properties, the mesh must have registered named
|
||||
properties with equal names (case-sensitive compare). Additionally,
|
||||
when reading the data, the number of bytes read for a property must
|
||||
match the provided number in the file. If the OM reader did not find a
|
||||
suitable named property, it will simply skip it. If the number of bytes
|
||||
do not match, the complete restore will be terminated and \c
|
||||
IO::read_mesh() will return \c false. And if the data cannot be
|
||||
restored, because the appropriate restore method is not available the
|
||||
exception std::logic_error() will be thrown.
|
||||
// for each face an extra double value
|
||||
OpenMesh::FPropHandleT< double > fprop_double;
|
||||
mesh.add_property( fprop_double ,"Face property name");
|
||||
|
||||
Since we now know the behaviour, we need to know what kind of data can
|
||||
we store? Without any further effort, simply using named properties
|
||||
and setting the persistent flag, we can store following types
|
||||
// for the mesh an extra string
|
||||
OpenMesh::MPropHandleT< string > mprop_string;
|
||||
mesh.add_property( mprop_string , "Mesh property name ");
|
||||
|
||||
- bool, stored as a bitset
|
||||
- all other fundamental types except long double, (unsigned) long and size_t
|
||||
- std::string, each up to 65536 characters long
|
||||
- OpenMesh::Vec[1,2,3,4,6][c,uc,s,us,i,ui,f,d]
|
||||
\endcode
|
||||
|
||||
For further reading we call these types basic types. Apparently we
|
||||
cannot store non-basic types, which are
|
||||
Accessing to the property is available via the property function.
|
||||
This function gets the property handle (created above) and a
|
||||
handle (e.g. to a vertex or a face):
|
||||
|
||||
- pointers
|
||||
- structs/classes
|
||||
- even more complex data structures, like container of containers.
|
||||
\code
|
||||
// Write something to a face property:
|
||||
mesh->property( <FaceProperty> , <FaceHandle> ) = <new value>;
|
||||
|
||||
However there is a way to store custom types ( else we could not store
|
||||
std::string). Let's start with an more simple custom data. For
|
||||
instance we have a struct \c MyData like this
|
||||
// E.g.
|
||||
for (f_it=mesh->faces_begin(); f_it!=mesh->faces_end() ; ++f_it) {
|
||||
mesh->property( fprop_double , *f_it ) = 0.0;
|
||||
}
|
||||
\endcode
|
||||
|
||||
\dontinclude 09-persistence/persistence.cc
|
||||
\skipline struct MyData
|
||||
\until vec4fval
|
||||
\skipline };
|
||||
As you can attach properties to the mesh, you might want to add a property in one
|
||||
function and access it in another, where the handle is not yet available. You can
|
||||
retrieve the required handle in the following way (Note that the handles are accessed by their name and type):
|
||||
|
||||
Here we keep an int, bool, double value and a vector of 4 floats, which
|
||||
are all basic types. Then we need to specialize the template struct
|
||||
OpenMesh::IO::binary<> within the namespace \c OpenMesh::IO
|
||||
\code
|
||||
// Specify handle type (Double face handle in this case):
|
||||
OpenMesh::FPropHandleT< double > fprop_double;
|
||||
|
||||
\skipline binary<MyData>
|
||||
// Try to get handle with the given name.
|
||||
if ( !mesh_.get_property_handle(fprop_double,"Face property name") ) {
|
||||
std::cerr << "Unable to retrieve property! " << std::endl;
|
||||
return
|
||||
}
|
||||
|
||||
Remember not to use long double, (unsigned) long and size_t as basic types
|
||||
because of inconsistencies between 32/64bit architectures.
|
||||
// If we reach this point, we have a valid handle.
|
||||
\endcode
|
||||
|
||||
Herein we have to implement the following set of static member
|
||||
variables and functions:
|
||||
The properties can be removed by calling remove_property:
|
||||
|
||||
\skipline is_streamable
|
||||
\skipline size_of
|
||||
\skipline size_of
|
||||
\skipline store
|
||||
\skipline restore
|
||||
\code
|
||||
// Remove the property
|
||||
mesh->remove_property(fprop_double);
|
||||
\endcode
|
||||
|
||||
The flag \c is_streamable has to be set to \c true. Else the data
|
||||
cannot be stored at all.
|
||||
|
||||
<h5>\c size_of methods </h5>
|
||||
|
||||
Since the size of the custom data can be static, which means we know
|
||||
the size at compile time, or the size of it is dynamic, which means me
|
||||
the size is known at runtime, we have to provide the two \c size_of()
|
||||
methods.
|
||||
A useful function to see all properties on the mesh is:
|
||||
|
||||
The first declaration is for the static case, while the second for the
|
||||
dynamic case. Though the static case is more simple, it is not
|
||||
straight forward. We cannot simply use \c sizeof() to determine the
|
||||
data size, because it will return the number ob bytes it needs in
|
||||
memory (possible 32bit alignment). Instead we need the binary size,
|
||||
hence we have to add up the single elements in the struct.
|
||||
\code
|
||||
// Print all available properties
|
||||
mesh->property_stats();
|
||||
\endcode
|
||||
|
||||
\dontinclude 09-persistence/persistence.cc
|
||||
\skipline return sizeof
|
||||
|
||||
Actually we would need to sum up the single elements of the vector,
|
||||
but in this case we know for sure the result (4 floats make 16 bytes,
|
||||
which is 32bit aligned therefore \c sizeof() returns the wanted
|
||||
size). But keep in mind, that this a potential location for errors,
|
||||
when writing custom binary support.
|
||||
|
||||
The second declaration is for the dynamic case, where the custom data
|
||||
contains pointers or references. This static member must properly
|
||||
count the data, by disolving the pointers/references, if this data has
|
||||
to be stored as well. In the dynamic stetting the static variant cannot return
|
||||
the size, therefore it must return \c IO::UnknownSize.
|
||||
|
||||
In this case the dynamic variant simply returns the size by calling the static
|
||||
variant, as the sizes are identical for both cases.
|
||||
|
||||
<h5>\c store / \c restore </h5>
|
||||
|
||||
For the dynamic case as for the static case, we have to make up a
|
||||
scheme how we would store the data. One option is to store the length
|
||||
of the data and then store the data itself. For instance the type \c
|
||||
std::string is implemented this way. (We store first the length in a
|
||||
16bit word (=> max. length 65536), then the characters follow. Hence
|
||||
\c size_of() returns 2 bytes for the length plus the actual length of
|
||||
the value \c v.) Since \c MyData contains only basic types we can
|
||||
implement the necessary methods \c store and \c restore, by simply
|
||||
breaking up the data into the basic types using the pre-defined
|
||||
store/restore methods for them:
|
||||
|
||||
\skipline static size_t store
|
||||
\until }
|
||||
\skipline static size_t restore
|
||||
\until }
|
||||
|
||||
It's very important, that the store/restore methods count the
|
||||
written/read bytes correctly and return the value. On error both
|
||||
functions must return 0.
|
||||
|
||||
A more complex situation is given with the following property
|
||||
|
||||
\dontinclude 09-persistence/persistence.cc
|
||||
\skipline MyMap
|
||||
\skipline mprop_map
|
||||
|
||||
In this case the data contains a container, a map from strings to
|
||||
integer numbers. If we want to store this as well, we need to make up
|
||||
a scheme how the map will be stored in a sequential layout. First we
|
||||
store the number of elements in the map. Then, since the map has an
|
||||
iterator, we simply iterate over all elements and store each pair
|
||||
(key/value). This procedure is equal for the \c size_of(), \c store(), and \c
|
||||
restore() methods. For example the \c size_of() methods look like this
|
||||
|
||||
\dontinclude 09-persistence/persistence.cc
|
||||
\skip binary< MyMap >
|
||||
\skipline static size_t size_of
|
||||
\skipline static size_t size_of
|
||||
\until }
|
||||
\until }
|
||||
|
||||
The implementation of \c store() and \c restore() follow a similar pattern.
|
||||
|
||||
The given example program does the following steps
|
||||
|
||||
-# Create a mesh and generate a cube
|
||||
-# Add a few custom properties
|
||||
-# Fill them with test data
|
||||
-# Make the properties persistent
|
||||
-# Store mesh in a file named 'persistent-check.om'
|
||||
-# Clear the mesh
|
||||
-# Restore mesh
|
||||
-# Check the content on equality with the test data.
|
||||
|
||||
Since the example is a little bit longer than usual the source is in
|
||||
several files. The main program is in \c persistence.cc, the cube
|
||||
generator in \c generate_cube.hh, \c stats.hh provides little tools to
|
||||
display information about the mesh and the properties, the file \c
|
||||
fill_props.hh providing the test data, and \c int2roman.hh/.cc, which
|
||||
is used in fill_props.hh. All necessary parts are in \c
|
||||
persistence.cc, which is displayed in full length below. For the other
|
||||
files please have a look in the directory \c
|
||||
OpenMesh/Doc/Tutorial/09-persistence/.
|
||||
|
||||
\include 09-persistence/persistence.cc
|
||||
A useful class for handling properties and their lifetime is the OpenMesh::PropertyManager.
|
||||
|
||||
*/
|
||||
186
Doc/tutorial_10.docu
Normal file
186
Doc/tutorial_10.docu
Normal file
@@ -0,0 +1,186 @@
|
||||
/** \page tutorial_10 Storing custom properties
|
||||
|
||||
The %OpenMesh' proprietary OM format allows to store and restore
|
||||
custom properties along with the standard properties. For it we have
|
||||
to use named custom properties like the following one
|
||||
|
||||
\dontinclude 10-persistence/persistence.cc
|
||||
\skipline VPropHandleT
|
||||
\skipline mesh.add_property
|
||||
|
||||
Here we registered a float property for the vertices at the mesh with
|
||||
name "vprop_float". The name of a property, that we want to make
|
||||
persistent, must follow a few rules
|
||||
|
||||
-# max. 256 characters long
|
||||
-# The prefixes \c "v:", \c "h:", \c "e:", \c "f:" and \c "m:" are reserved.
|
||||
|
||||
If we stick to this rules we are fine. Furthermore we have to
|
||||
consider, that the names are handled case-sensitive.
|
||||
|
||||
To actually make a custom property persistent we have to set the
|
||||
persistent flag in the property with
|
||||
|
||||
\skipline mesh.property(vprop_float).set_persistent
|
||||
|
||||
Now we can use \c IO::mesh_write() to write the mesh to a file on
|
||||
disk. The custom properties are added after the standard properties
|
||||
in the file, with the name and it's binary size. These two pieces of
|
||||
information are evaluated when reading the file again. To successfully
|
||||
restore the custom properties, the mesh must have registered named
|
||||
properties with equal names (case-sensitive compare). Additionally,
|
||||
when reading the data, the number of bytes read for a property must
|
||||
match the provided number in the file. If the OM reader did not find a
|
||||
suitable named property, it will simply skip it. If the number of bytes
|
||||
do not match, the complete restore will be terminated and \c
|
||||
IO::read_mesh() will return \c false. And if the data cannot be
|
||||
restored, because the appropriate restore method is not available the
|
||||
exception std::logic_error() will be thrown.
|
||||
|
||||
Since we now know the behaviour, we need to know what kind of data can
|
||||
we store? Without any further effort, simply using named properties
|
||||
and setting the persistent flag, we can store following types
|
||||
|
||||
- bool, stored as a bitset
|
||||
- all other fundamental types except long double, (unsigned) long and size_t
|
||||
- std::string, each up to 65536 characters long
|
||||
- OpenMesh::Vec[1,2,3,4,6][c,uc,s,us,i,ui,f,d]
|
||||
|
||||
For further reading we call these types basic types. Apparently we
|
||||
cannot store non-basic types, which are
|
||||
|
||||
- pointers
|
||||
- structs/classes
|
||||
- even more complex data structures, like container of containers.
|
||||
|
||||
However there is a way to store custom types ( else we could not store
|
||||
std::string). Let's start with an more simple custom data. For
|
||||
instance we have a struct \c MyData like this
|
||||
|
||||
\dontinclude 10-persistence/persistence.cc
|
||||
\skipline struct MyData
|
||||
\until vec4fval
|
||||
\skipline };
|
||||
|
||||
Here we keep an int, bool, double value and a vector of 4 floats, which
|
||||
are all basic types. Then we need to specialize the template struct
|
||||
OpenMesh::IO::binary<> within the namespace \c OpenMesh::IO
|
||||
|
||||
\skipline binary<MyData>
|
||||
|
||||
Remember not to use long double, (unsigned) long and size_t as basic types
|
||||
because of inconsistencies between 32/64bit architectures.
|
||||
|
||||
Herein we have to implement the following set of static member
|
||||
variables and functions:
|
||||
|
||||
\skipline is_streamable
|
||||
\skipline size_of
|
||||
\skipline size_of
|
||||
\skipline store
|
||||
\skipline restore
|
||||
|
||||
The flag \c is_streamable has to be set to \c true. Else the data
|
||||
cannot be stored at all.
|
||||
|
||||
<h5>\c size_of methods </h5>
|
||||
|
||||
Since the size of the custom data can be static, which means we know
|
||||
the size at compile time, or the size of it is dynamic, which means me
|
||||
the size is known at runtime, we have to provide the two \c size_of()
|
||||
methods.
|
||||
|
||||
The first declaration is for the static case, while the second for the
|
||||
dynamic case. Though the static case is more simple, it is not
|
||||
straight forward. We cannot simply use \c sizeof() to determine the
|
||||
data size, because it will return the number ob bytes it needs in
|
||||
memory (possible 32bit alignment). Instead we need the binary size,
|
||||
hence we have to add up the single elements in the struct.
|
||||
|
||||
\dontinclude 10-persistence/persistence.cc
|
||||
\skipline return sizeof
|
||||
|
||||
Actually we would need to sum up the single elements of the vector,
|
||||
but in this case we know for sure the result (4 floats make 16 bytes,
|
||||
which is 32bit aligned therefore \c sizeof() returns the wanted
|
||||
size). But keep in mind, that this a potential location for errors,
|
||||
when writing custom binary support.
|
||||
|
||||
The second declaration is for the dynamic case, where the custom data
|
||||
contains pointers or references. This static member must properly
|
||||
count the data, by disolving the pointers/references, if this data has
|
||||
to be stored as well. In the dynamic stetting the static variant cannot return
|
||||
the size, therefore it must return \c IO::UnknownSize.
|
||||
|
||||
In this case the dynamic variant simply returns the size by calling the static
|
||||
variant, as the sizes are identical for both cases.
|
||||
|
||||
<h5>\c store / \c restore </h5>
|
||||
|
||||
For the dynamic case as for the static case, we have to make up a
|
||||
scheme how we would store the data. One option is to store the length
|
||||
of the data and then store the data itself. For instance the type \c
|
||||
std::string is implemented this way. (We store first the length in a
|
||||
16bit word (=> max. length 65536), then the characters follow. Hence
|
||||
\c size_of() returns 2 bytes for the length plus the actual length of
|
||||
the value \c v.) Since \c MyData contains only basic types we can
|
||||
implement the necessary methods \c store and \c restore, by simply
|
||||
breaking up the data into the basic types using the pre-defined
|
||||
store/restore methods for them:
|
||||
|
||||
\skipline static size_t store
|
||||
\until }
|
||||
\skipline static size_t restore
|
||||
\until }
|
||||
|
||||
It's very important, that the store/restore methods count the
|
||||
written/read bytes correctly and return the value. On error both
|
||||
functions must return 0.
|
||||
|
||||
A more complex situation is given with the following property
|
||||
|
||||
\dontinclude 10-persistence/persistence.cc
|
||||
\skipline MyMap
|
||||
\skipline mprop_map
|
||||
|
||||
In this case the data contains a container, a map from strings to
|
||||
integer numbers. If we want to store this as well, we need to make up
|
||||
a scheme how the map will be stored in a sequential layout. First we
|
||||
store the number of elements in the map. Then, since the map has an
|
||||
iterator, we simply iterate over all elements and store each pair
|
||||
(key/value). This procedure is equal for the \c size_of(), \c store(), and \c
|
||||
restore() methods. For example the \c size_of() methods look like this
|
||||
|
||||
\dontinclude 10-persistence/persistence.cc
|
||||
\skip binary< MyMap >
|
||||
\skipline static size_t size_of
|
||||
\skipline static size_t size_of
|
||||
\until }
|
||||
\until }
|
||||
|
||||
The implementation of \c store() and \c restore() follow a similar pattern.
|
||||
|
||||
The given example program does the following steps
|
||||
|
||||
-# Create a mesh and generate a cube
|
||||
-# Add a few custom properties
|
||||
-# Fill them with test data
|
||||
-# Make the properties persistent
|
||||
-# Store mesh in a file named 'persistent-check.om'
|
||||
-# Clear the mesh
|
||||
-# Restore mesh
|
||||
-# Check the content on equality with the test data.
|
||||
|
||||
Since the example is a little bit longer than usual the source is in
|
||||
several files. The main program is in \c persistence.cc, the cube
|
||||
generator in \c generate_cube.hh, \c stats.hh provides little tools to
|
||||
display information about the mesh and the properties, the file \c
|
||||
fill_props.hh providing the test data, and \c int2roman.hh/.cc, which
|
||||
is used in fill_props.hh. All necessary parts are in \c
|
||||
persistence.cc, which is displayed in full length below. For the other
|
||||
files please have a look in the directory \c
|
||||
OpenMesh/Doc/Tutorial/10-persistence/.
|
||||
|
||||
\include 10-persistence/persistence.cc
|
||||
|
||||
*/
|
||||
85
Doc/tutorial_11.docu
Normal file
85
Doc/tutorial_11.docu
Normal file
@@ -0,0 +1,85 @@
|
||||
/** \page tutorial_11 Using Smart Handles
|
||||
|
||||
This examples shows:
|
||||
- How to use Smart Handles and ranges to navigate on the mesh
|
||||
- How to use Smart Ranges
|
||||
|
||||
So far we have used methods such as halfedge_handle(), next_halfedge_handle(), prev_halfedge_handle(), oppopsite_halfedge_handle(), face_handle(), to_vertex_handle(), and some others, to navigate on that mesh. These functions are defined on a mesh and require as input a handle to an element of the mesh, such as VertexHandle or HalfedgeHandle. In the following example we iterate over all vertices of a triangle mesh and for each vertex we create a list of the vertices that lie opposite of the edges in the ring around the vertex:
|
||||
|
||||
\code
|
||||
// iterate over vertices of the mesh
|
||||
for (auto vh : mesh.vertices())
|
||||
{
|
||||
std::vector<OpenMesh::VertexHandle> opposite_vertices;
|
||||
// iterate over all outgoing halfedges
|
||||
for (auto heh : mesh.voh_range(vh))
|
||||
{
|
||||
// navigate to the opposite vertex and store it in the vector
|
||||
opposite_vertices.push_back(mesh.to_vertex_handle(mesh.next_halfedge_handle(mesh.opposite_halfedge_handle(mesh.next_halfedge_handle(heh)))));
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
|
||||
For a more concise way of navigating OpenMesh provides smart handles, OpenMesh::SmartVertexHandle, OpenMesh::SmartHalfedgeHandle, OpenMesh::SmartEdgeHandle, and OpenMesh::SmartFaceHandle. Smart handles are smart, because they know to which mesh they belong. This allows them to provide functions for navigating the mesh allowing us to write the above code much simpler:
|
||||
|
||||
\code
|
||||
// iterate over vertices of the mesh
|
||||
for (auto vh : mesh.vertices())
|
||||
{
|
||||
// iterate over all outgoing halfedges
|
||||
std::vector<OpenMesh::VertexHandle> opposite_vertices;
|
||||
for (auto heh : vh.outgoing_halfedges())
|
||||
{
|
||||
// navigate to the opposite vertex and store it in the vector
|
||||
opposite_vertices.push_back(heh.next().opp().next().to());
|
||||
}
|
||||
}
|
||||
\endcode
|
||||
|
||||
The ranges of OpenMesh that are returned by functions like voh_range() or outgoing_halfedges() all provide a few methods than can simplify some calculations (see OpenMesh::SmartRangeT). One example is the to_vector() method which convertes the range of elements into a vector containing the elements. All of these methods take a functor as argument (sometimes optional) which is called for each element of the range. With this, the above code can also be implemented like this:
|
||||
|
||||
\code
|
||||
// iterate over vertices of the mesh
|
||||
for (auto vh : mesh.vertices())
|
||||
{
|
||||
// create lambda that returns opposite vertex
|
||||
auto opposite_vertex = [](OpenMesh::SmartHalfedgeHandle heh) { return heh.next().opp().next().to(); };
|
||||
// create vector containing all opposite vertices
|
||||
auto opposite_vertices = vh.outgoing_halfedges().to_vector(opposite_vertex);
|
||||
}
|
||||
\endcode
|
||||
|
||||
---
|
||||
|
||||
## Code Example
|
||||
|
||||
In this example, we will use bi-laplacian smoothing on a mesh. We store the \c laplace vector which is the vector pointing from a vertex to the center of gravity of its neighboring vertices in a vertex property.
|
||||
|
||||
\dontinclude 11-smart_handles/smooth.cc
|
||||
\skipline laplace
|
||||
\skipline laplace
|
||||
|
||||
To compute the center of gravity, i.e. the average position, we use the avg() method of the range of 1-ring vertices and pass in a PropertyManager acting as functor returning the corresponding point of a vertex.
|
||||
|
||||
\skipline points
|
||||
\until avg(points)
|
||||
|
||||
Similarily we compute the update vector as the laplace of the freshly computed laplace vectors by simply exchanging the points property manager with the laplace property manager.
|
||||
|
||||
\skipline Iterate
|
||||
\until bi_laplace
|
||||
|
||||
Finally, we apply the update after damping it by a factor of -0.5.
|
||||
|
||||
\skipline udpate points
|
||||
\until bi_laplace
|
||||
|
||||
Below is the complete source code:
|
||||
|
||||
\include 11-smart_handles/smooth.cc
|
||||
|
||||
---
|
||||
|
||||
|
||||
|
||||
*/
|
||||
@@ -33,12 +33,14 @@ repeatedly replacing each vertex' position by the center of gravity
|
||||
<li> \subpage tutorial_02
|
||||
<li> \subpage tutorial_03
|
||||
<li> \subpage tutorial_04
|
||||
<li> \subpage tutorial_11
|
||||
<li> \subpage tutorial_05
|
||||
<li> \subpage tutorial_06
|
||||
<li> \subpage tutorial_07
|
||||
<li> \subpage tutorial_07b
|
||||
<li> \subpage tutorial_08
|
||||
<li> \subpage tutorial_09
|
||||
<li> \subpage tutorial_10
|
||||
</ol>
|
||||
|
||||
*/
|
||||
|
||||
18
OpenMesh.pro
18
OpenMesh.pro
@@ -1,18 +0,0 @@
|
||||
contains( OPENFLIPPER , OpenFlipper ){
|
||||
include( $$TOPDIR/qmake/all.include )
|
||||
} else {
|
||||
include( $$TOPDIR/OpenMesh/qmake/all.include )
|
||||
}
|
||||
|
||||
Subdirs()
|
||||
|
||||
addSubdirs( src/OpenMesh/Core )
|
||||
addSubdirs( src/OpenMesh/Tools , src/OpenMesh/Core )
|
||||
addSubdirs( src/OpenMesh/Apps/commandlineDecimater , src/OpenMesh/Core src/OpenMesh/Tools)
|
||||
addSubdirs( src/OpenMesh/Apps/Decimating/DecimaterGui , src/OpenMesh/Core src/OpenMesh/Tools)
|
||||
addSubdirs( src/OpenMesh/Apps/mconvert , src/OpenMesh/Core src/OpenMesh/Tools)
|
||||
addSubdirs( src/OpenMesh/Apps/QtViewer , src/OpenMesh/Core src/OpenMesh/Tools)
|
||||
addSubdirs( src/OpenMesh/Apps/Smoothing , src/OpenMesh/Core src/OpenMesh/Tools)
|
||||
addSubdirs( src/OpenMesh/Apps/Subdivider/commandlineSubdivider , src/OpenMesh/Core src/OpenMesh/Tools)
|
||||
addSubdirs( src/OpenMesh/Apps/Subdivider/commandlineAdaptiveSubdivider , src/OpenMesh/Core src/OpenMesh/Tools)
|
||||
addSubdirs( src/OpenMesh/Apps/Subdivider/SubdividerGui , src/OpenMesh/Core src/OpenMesh/Tools)
|
||||
31
README.md
31
README.md
@@ -1,4 +1,6 @@
|
||||
# OpenMesh, 7.0
|
||||
# OpenMesh, 8.1
|
||||
|
||||
[](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/commits/master)
|
||||
|
||||
|
||||
## Getting OpenMesh
|
||||
@@ -10,6 +12,33 @@ https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh.git
|
||||
The gitlab site can be found here:
|
||||
https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh
|
||||
|
||||
The python bindings can be found here:
|
||||
https://www.graphics.rwth-aachen.de:9000/OpenMesh/openmesh-python
|
||||
|
||||
## Download Binaries
|
||||
|
||||
The following binaries are created from the latest master. They are automatically tested and deployed.
|
||||
|
||||
### Windows
|
||||
|
||||
| Visual Studio Version: | 2017 | 2015 |
|
||||
| -------- | -------- |-------- |
|
||||
| 64-Bit shared, with apps | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2017-64-bit-shared-apps) | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-64-bit-shared-apps) |
|
||||
| 32-Bit shared, with apps | - | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-32-bit-shared-apps) |
|
||||
| 64-Bit static, with apps | [Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2017-64-bit-static-apps) | [Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-64-bit-static-apps) |
|
||||
| 32-Bit static, with apps | - | [ Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-32-bit-static-apps) |
|
||||
| 64-Bit shared, no apps | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2017-64-bit-shared-no-apps) | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-64-bit-shared-no-apps) |
|
||||
| 32-Bit shared, no apps | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2017-32-bit-shared-no-apps) | [Download](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-32-bit-shared-no-apps) |
|
||||
| 64-Bit static, no apps | [Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2017-64-bit-static-no-apps) | [Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-64-bit-static-no-apps) |
|
||||
| 32-Bit static, no apps | [ Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2017-32-bit-static-no-apps) | [ Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release?job=VS2015-32-bit-static-no-apps) |
|
||||
|
||||
### Apple
|
||||
[Download ](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/build-release-cpp11?job=macos-cpp11)
|
||||
|
||||
## Download Sources
|
||||
[ Download Sources](https://www.graphics.rwth-aachen.de:9000/OpenMesh/OpenMesh/-/jobs/artifacts/master/browse/?job=Sources )
|
||||
|
||||
|
||||
## Installing
|
||||
Unpack the tar-ball to a suitable place.
|
||||
|
||||
|
||||
4
VERSION
4
VERSION
@@ -1,5 +1,5 @@
|
||||
VERSION=7.0
|
||||
MAJOR=7
|
||||
VERSION=9.0
|
||||
MAJOR=9
|
||||
MINOR=0
|
||||
PATCH=0
|
||||
ID=OPENMESH
|
||||
|
||||
@@ -87,15 +87,6 @@ else ()
|
||||
set (ACG_PROJECT_BINDIR "bin")
|
||||
endif ()
|
||||
|
||||
if( NOT APPLE )
|
||||
# check 64 bit
|
||||
if( CMAKE_SIZEOF_VOID_P MATCHES 4 )
|
||||
set( HAVE_64_BIT 0 )
|
||||
else( CMAKE_SIZEOF_VOID_P MATCHES 4 )
|
||||
set( HAVE_64_BIT 1 )
|
||||
endif( CMAKE_SIZEOF_VOID_P MATCHES 4 )
|
||||
endif ( NOT APPLE )
|
||||
|
||||
# allow a project to modify the directories
|
||||
if (COMMAND acg_modify_project_dirs)
|
||||
acg_modify_project_dirs ()
|
||||
@@ -115,7 +106,6 @@ macro (acg_set_target_props target)
|
||||
SKIP_BUILD_RPATH 0
|
||||
)
|
||||
elseif (APPLE AND NOT ACG_PROJECT_MACOS_BUNDLE)
|
||||
if (NOT (CMAKE_MAJOR_VERSION LESS 3) )
|
||||
# save rpath
|
||||
set_target_properties (
|
||||
${target} PROPERTIES
|
||||
@@ -124,15 +114,6 @@ macro (acg_set_target_props target)
|
||||
#BUILD_WITH_INSTALL_RPATH 1
|
||||
SKIP_BUILD_RPATH 0
|
||||
)
|
||||
else()
|
||||
# save rpath via install name dir
|
||||
set_target_properties (
|
||||
${target} PROPERTIES
|
||||
INSTALL_NAME_DIR "@executable_path/../${ACG_PROJECT_LIBDIR}"
|
||||
#BUILD_WITH_INSTALL_RPATH 1
|
||||
SKIP_BUILD_RPATH 0
|
||||
)
|
||||
endif(NOT (CMAKE_MAJOR_VERSION LESS 3))
|
||||
elseif (NOT APPLE)
|
||||
|
||||
set_target_properties (
|
||||
@@ -152,155 +133,6 @@ include (ACGCompiler)
|
||||
# define INCLUDE_TEMPLATES for everything we build
|
||||
add_definitions (-DINCLUDE_TEMPLATES)
|
||||
|
||||
#unset cached qt variables which are set by all qt versions. version is the major number of the qt version (e.g. 4 or 5, not 4.8)
|
||||
macro (acg_unset_qt_shared_variables version)
|
||||
if (ACG_INTERNAL_QT_LAST_VERSION)
|
||||
if (NOT ${ACG_INTERNAL_QT_LAST_VERSION} EQUAL ${version})
|
||||
unset(QT_BINARY_DIR)
|
||||
unset(QT_PLUGINS_DIR)
|
||||
unset(ACG_INTERNAL_QT_LAST_VERSION)
|
||||
endif()
|
||||
endif()
|
||||
set (ACG_INTERNAL_QT_LAST_VERSION "${version}" CACHE INTERNAL "Qt Version, which was used on the last time")
|
||||
endmacro()
|
||||
|
||||
# look for selected qt dependencies
|
||||
macro (acg_qt4)
|
||||
if (NOT QT4_FOUND)
|
||||
acg_unset_qt_shared_variables(4)
|
||||
find_package (Qt4 COMPONENTS QtCore QtGui ${ARGN})
|
||||
|
||||
set (QT_USE_QTOPENGL 1)
|
||||
set (QT_USE_QTNETWORK 1)
|
||||
set (QT_USE_QTSCRIPT 1)
|
||||
set (QT_USE_QTSQL 1)
|
||||
set (QT_USE_QTXML 1)
|
||||
set (QT_USE_QTXMLPATTERNS 1)
|
||||
set (QT_USE_QTHELP 1)
|
||||
set (QT_USE_QTWEBKIT 1)
|
||||
set (QT_USE_QTUITOOLS 1)
|
||||
|
||||
include (${QT_USE_FILE})
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
macro (acg_qt5)
|
||||
|
||||
if(POLICY CMP0020)
|
||||
# Automatically link Qt executables to qtmain target on Windows
|
||||
cmake_policy(SET CMP0020 NEW)
|
||||
endif(POLICY CMP0020)
|
||||
#if (NOT QT5_FOUND)
|
||||
|
||||
#set (QT_MIN_VERSION ${ARGN})
|
||||
|
||||
#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()
|
||||
|
||||
|
||||
|
||||
find_package (Qt5Core QUIET)
|
||||
|
||||
#find WINDOWS_SDK to avoid qt error. This must be done BEFORE Qt5Widgets is searched
|
||||
if (Qt5Core_FOUND AND WIN32)
|
||||
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}")
|
||||
|
||||
if ( (QT_VERSION_MAJOR EQUAL 5) AND (QT_VERSION_MINOR LESS 3 OR ( QT_VERSION_MINOR EQUAL 3 AND QT_VERSION_PATCH EQUAL 0 )) ) # for all Qt version > 5.0.0 and < 5.3.1
|
||||
#glu32.lib is needed by qt5 opengl version. it cannot find it by itself so we help qt
|
||||
#this block has to be executed, before Qt5Gui is searched, otherwise we will end up with the (not so useful) QT5 error message
|
||||
set(WINDOWS_SDK_LIBS "COULD_NOT_FOUND" CACHE PATH "Path to the latest windows sdk libs which includes glu32.lib. Used by Qt5.")
|
||||
if (EXISTS "${WINDOWS_SDK_LIBS}\\glu32.lib")
|
||||
set (CMAKE_PREFIX_PATH "${CMAKE_PREFIX_PATH};${WINDOWS_SDK_LIBS}")
|
||||
elseif(QT5_INSTALL_PATH_EXISTS) #trying to install qt5. notify about missing sdk before the qt message comes
|
||||
message(FATAL_ERROR "Could not find glu32.lib. This is necessary for QT5 OpenGL version for windows, spleace specify glu32.lib in WINDOWS_SDK_LIB or install Qt version >= 5.3.1")
|
||||
endif()
|
||||
endif()
|
||||
endif(Qt5Core_FOUND AND WIN32)
|
||||
|
||||
find_package (Qt5Gui QUIET)
|
||||
find_package (Qt5OpenGL QUIET)
|
||||
|
||||
|
||||
if (Qt5Core_FOUND AND Qt5Gui_FOUND AND Qt5OpenGL_FOUND)
|
||||
set (QT5_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if (QT5_FOUND)
|
||||
acg_unset_qt_shared_variables(5)
|
||||
|
||||
#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)
|
||||
|
||||
include_directories(${Qt5Core_INCLUDE_DIRS})
|
||||
include_directories(${Qt5Gui_INCLUDE_DIRS})
|
||||
include_directories(${Qt5OpenGL_INCLUDE_DIRS})
|
||||
add_definitions(${Qt5Core_DEFINITIONS})
|
||||
add_definitions(${Qt5Gui_DEFINITIONS})
|
||||
add_definitions(${Qt5OpenGL_DEFINITIONS})
|
||||
|
||||
if ( NOT MSVC )
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
|
||||
endif()
|
||||
|
||||
set (QT_LIBRARIES ${Qt5Core_LIBRARIES} ${Qt5Widgets_LIBRARIES}
|
||||
${Qt5Gui_LIBRARIES} ${Qt5OpenGL_LIBRARIES})
|
||||
|
||||
if (MSVC)
|
||||
set (QT_LIBRARIES ${QT_LIBRARIES} ${Qt5Core_QTMAIN_LIBRARIES})
|
||||
endif()
|
||||
|
||||
#add_definitions(-DQT_NO_OPENGL)
|
||||
|
||||
#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)
|
||||
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
# unsets the given variable
|
||||
macro (acg_unset var)
|
||||
set (${var} "" CACHE INTERNAL "")
|
||||
@@ -311,35 +143,6 @@ macro (acg_set var value)
|
||||
set (${var} ${value} CACHE INTERNAL "")
|
||||
endmacro ()
|
||||
|
||||
# test for OpenMP
|
||||
macro (acg_openmp)
|
||||
if (NOT OPENMP_NOTFOUND)
|
||||
find_package(OpenMP)
|
||||
if (OPENMP_FOUND)
|
||||
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
|
||||
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
|
||||
add_definitions(-DUSE_OPENMP)
|
||||
else ()
|
||||
set (OPENMP_NOTFOUND 1)
|
||||
endif ()
|
||||
endif ()
|
||||
endmacro ()
|
||||
|
||||
# test for FTGL
|
||||
macro (acg_ftgl)
|
||||
find_package (Freetype)
|
||||
|
||||
if (FREETYPE_FOUND)
|
||||
find_package (FTGL)
|
||||
|
||||
if (FTGL_FOUND)
|
||||
add_definitions (-DUSE_FTGL)
|
||||
include_directories (${FTGL_INCLUDE_DIR} ${FREETYPE_INCLUDE_DIR_freetype2})
|
||||
set (FTGL_LIBS ${FREETYPE_LIBRARIES} ${FTGL_LIBRARIES})
|
||||
endif ()
|
||||
endif ()
|
||||
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)
|
||||
@@ -355,217 +158,11 @@ macro (acg_append_files ret ext)
|
||||
endforeach ()
|
||||
endmacro ()
|
||||
|
||||
# append all files with extension "ext" in the "dirs" directories and its subdirectories to "ret"
|
||||
# excludes all files starting with a '.' (dot)
|
||||
macro (acg_append_files_recursive ret ext)
|
||||
foreach (_dir ${ARGN})
|
||||
file (GLOB_RECURSE _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 ()
|
||||
|
||||
|
||||
# drop all "*T.cc" files from list
|
||||
macro (acg_drop_templates list)
|
||||
foreach (_file ${${list}})
|
||||
if (_file MATCHES "T.cc$")
|
||||
list (REMOVE_ITEM ${list} ${_file})
|
||||
endif ()
|
||||
endforeach ()
|
||||
endmacro ()
|
||||
|
||||
# generate moc targets for sources in list
|
||||
macro (acg_qt4_automoc moc_SRCS)
|
||||
qt4_get_moc_flags (_moc_INCS)
|
||||
|
||||
set (_matching_FILES )
|
||||
foreach (_current_FILE ${ARGN})
|
||||
|
||||
get_filename_component (_abs_FILE ${_current_FILE} ABSOLUTE)
|
||||
# if "SKIP_AUTOMOC" is set to true, we will not handle this file here.
|
||||
# here. this is required to make bouic work correctly:
|
||||
# we need to add generated .cpp files to the sources (to compile them),
|
||||
# but we cannot let automoc handle them, as the .cpp files don't exist yet when
|
||||
# cmake is run for the very first time on them -> however the .cpp files might
|
||||
# exist at a later run. at that time we need to skip them, so that we don't add two
|
||||
# different rules for the same moc file
|
||||
get_source_file_property (_skip ${_abs_FILE} SKIP_AUTOMOC)
|
||||
|
||||
if ( NOT _skip AND EXISTS ${_abs_FILE} )
|
||||
|
||||
file (READ ${_abs_FILE} _contents)
|
||||
|
||||
get_filename_component (_abs_PATH ${_abs_FILE} PATH)
|
||||
|
||||
string (REGEX MATCHALL "Q_OBJECT" _match "${_contents}")
|
||||
if (_match)
|
||||
get_filename_component (_basename ${_current_FILE} NAME_WE)
|
||||
set (_header ${_abs_FILE})
|
||||
set (_moc ${CMAKE_CURRENT_BINARY_DIR}/moc_${_basename}.cpp)
|
||||
|
||||
add_custom_command (OUTPUT ${_moc}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${_moc_INCS} ${_header} -o ${_moc}
|
||||
DEPENDS ${_header}
|
||||
)
|
||||
|
||||
add_file_dependencies (${_abs_FILE} ${_moc})
|
||||
set (${moc_SRCS} ${${moc_SRCS}} ${_moc})
|
||||
|
||||
endif ()
|
||||
endif ()
|
||||
endforeach ()
|
||||
endmacro ()
|
||||
|
||||
# generate moc targets for sources in list
|
||||
macro (acg_qt5_automoc moc_SRCS)
|
||||
qt5_get_moc_flags (_moc_INCS)
|
||||
|
||||
list(REMOVE_DUPLICATES _moc_INCS)
|
||||
|
||||
set (_matching_FILES )
|
||||
foreach (_current_FILE ${ARGN})
|
||||
|
||||
get_filename_component (_abs_FILE ${_current_FILE} ABSOLUTE)
|
||||
# if "SKIP_AUTOMOC" is set to true, we will not handle this file here.
|
||||
# here. this is required to make bouic work correctly:
|
||||
# we need to add generated .cpp files to the sources (to compile them),
|
||||
# but we cannot let automoc handle them, as the .cpp files don't exist yet when
|
||||
# cmake is run for the very first time on them -> however the .cpp files might
|
||||
# exist at a later run. at that time we need to skip them, so that we don't add two
|
||||
# different rules for the same moc file
|
||||
get_source_file_property (_skip ${_abs_FILE} SKIP_AUTOMOC)
|
||||
|
||||
if ( NOT _skip AND EXISTS ${_abs_FILE} )
|
||||
|
||||
file (READ ${_abs_FILE} _contents)
|
||||
|
||||
get_filename_component (_abs_PATH ${_abs_FILE} PATH)
|
||||
|
||||
string (REGEX MATCHALL "Q_OBJECT" _match "${_contents}")
|
||||
if (_match)
|
||||
get_filename_component (_basename ${_current_FILE} NAME_WE)
|
||||
set (_header ${_abs_FILE})
|
||||
set (_moc ${CMAKE_CURRENT_BINARY_DIR}/moc_${_basename}.cpp)
|
||||
|
||||
add_custom_command (OUTPUT ${_moc}
|
||||
COMMAND ${QT_MOC_EXECUTABLE}
|
||||
ARGS ${_moc_INCS} ${_header} -o ${_moc}
|
||||
DEPENDS ${_header}
|
||||
)
|
||||
|
||||
add_file_dependencies (${_abs_FILE} ${_moc})
|
||||
set (${moc_SRCS} ${${moc_SRCS}} ${_moc})
|
||||
|
||||
endif ()
|
||||
endif ()
|
||||
endforeach ()
|
||||
endmacro ()
|
||||
|
||||
# generate uic targets for sources in list
|
||||
macro (acg_qt4_autouic uic_SRCS)
|
||||
|
||||
set (_matching_FILES )
|
||||
foreach (_current_FILE ${ARGN})
|
||||
|
||||
get_filename_component (_abs_FILE ${_current_FILE} ABSOLUTE)
|
||||
|
||||
if ( EXISTS ${_abs_FILE} )
|
||||
|
||||
file (READ ${_abs_FILE} _contents)
|
||||
|
||||
get_filename_component (_abs_PATH ${_abs_FILE} PATH)
|
||||
|
||||
get_filename_component (_basename ${_current_FILE} NAME_WE)
|
||||
string (REGEX REPLACE "Ui$" "" _cbasename ${_basename})
|
||||
set (_outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${_basename}.hh)
|
||||
set (_header ${_basename}.hh)
|
||||
set (_source ${_abs_PATH}/${_cbasename}.cc)
|
||||
|
||||
add_custom_command (OUTPUT ${_outfile}
|
||||
COMMAND ${QT_UIC_EXECUTABLE}
|
||||
ARGS -o ${_outfile} ${_abs_FILE}
|
||||
DEPENDS ${_abs_FILE})
|
||||
|
||||
add_file_dependencies (${_source} ${_outfile})
|
||||
set (${uic_SRCS} ${${uic_SRCS}} ${_outfile})
|
||||
|
||||
endif ()
|
||||
endforeach ()
|
||||
endmacro ()
|
||||
|
||||
# generate uic targets for sources in list
|
||||
macro (acg_qt5_autouic uic_SRCS)
|
||||
|
||||
set (_matching_FILES )
|
||||
foreach (_current_FILE ${ARGN})
|
||||
|
||||
get_filename_component (_abs_FILE ${_current_FILE} ABSOLUTE)
|
||||
|
||||
if ( EXISTS ${_abs_FILE} )
|
||||
|
||||
file (READ ${_abs_FILE} _contents)
|
||||
|
||||
get_filename_component (_abs_PATH ${_abs_FILE} PATH)
|
||||
|
||||
get_filename_component (_basename ${_current_FILE} NAME_WE)
|
||||
string (REGEX REPLACE "Ui$" "" _cbasename ${_basename})
|
||||
set (_outfile ${CMAKE_CURRENT_BINARY_DIR}/ui_${_basename}.hh)
|
||||
set (_header ${_basename}.hh)
|
||||
set (_source ${_abs_PATH}/${_cbasename}.cc)
|
||||
|
||||
add_custom_command (OUTPUT ${_outfile}
|
||||
COMMAND ${Qt5Widgets_UIC_EXECUTABLE}
|
||||
ARGS -o ${_outfile} ${_abs_FILE}
|
||||
MAIN_DEPENDENCY ${_abs_FILE} VERBATIM)
|
||||
|
||||
add_file_dependencies (${_source} ${_outfile})
|
||||
set (${uic_SRCS} ${${uic_SRCS}} ${_outfile})
|
||||
|
||||
endif ()
|
||||
endforeach ()
|
||||
endmacro ()
|
||||
|
||||
# generate qrc targets for sources in list
|
||||
macro (acg_qt4_autoqrc qrc_SRCS)
|
||||
|
||||
set (_matching_FILES )
|
||||
foreach (_current_FILE ${ARGN})
|
||||
|
||||
get_filename_component (_abs_FILE ${_current_FILE} ABSOLUTE)
|
||||
|
||||
if ( EXISTS ${_abs_FILE} )
|
||||
|
||||
file (READ ${_abs_FILE} _contents)
|
||||
|
||||
get_filename_component (_abs_PATH ${_abs_FILE} PATH)
|
||||
|
||||
get_filename_component (_basename ${_current_FILE} NAME_WE)
|
||||
set (_outfile ${CMAKE_CURRENT_BINARY_DIR}/qrc_${_basename}.cpp)
|
||||
|
||||
add_custom_command (OUTPUT ${_outfile}
|
||||
COMMAND ${QT_RCC_EXECUTABLE}
|
||||
ARGS -o ${_outfile} ${_abs_FILE}
|
||||
DEPENDS ${_abs_FILE})
|
||||
|
||||
add_file_dependencies (${_source} ${_outfile})
|
||||
set (${qrc_SRCS} ${${qrc_SRCS}} ${_outfile})
|
||||
|
||||
endif ()
|
||||
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.*")
|
||||
if ( (NOT _file MATCHES ".*svn.*") AND (NOT _file MATCHES ".DS_Store") )
|
||||
list (APPEND ${ret} "${_file}")
|
||||
endif ()
|
||||
endforeach ()
|
||||
@@ -582,18 +179,6 @@ function (acg_copy_after_build target src dst)
|
||||
endforeach ()
|
||||
endfunction ()
|
||||
|
||||
# install the whole directory without svn files
|
||||
function (acg_install_dir src dst)
|
||||
acg_unset (_files)
|
||||
acg_get_files_in_dir (_files ${src})
|
||||
foreach (_file ${_files})
|
||||
get_filename_component (_file_PATH ${_file} PATH)
|
||||
install(FILES "${src}/${_file}"
|
||||
DESTINATION "${dst}/${_file_PATH}"
|
||||
)
|
||||
endforeach ()
|
||||
endfunction ()
|
||||
|
||||
# extended version of add_executable that also copies output to out Build directory
|
||||
function (acg_add_executable _target)
|
||||
add_executable (${_target} ${ARGN})
|
||||
@@ -720,57 +305,3 @@ function (acg_add_library _target _libtype)
|
||||
|
||||
endfunction ()
|
||||
|
||||
#generates qt translations
|
||||
function (acg_add_translations _target _languages _sources)
|
||||
|
||||
string (TOUPPER ${_target} _TARGET)
|
||||
# generate/use translation files
|
||||
# run with UPDATE_TRANSLATIONS set to on to build qm files
|
||||
option (UPDATE_TRANSLATIONS_${_TARGET} "Update source translation *.ts files (WARNING: make clean will delete the source .ts files! Danger!)")
|
||||
|
||||
set (_new_ts_files)
|
||||
set (_ts_files)
|
||||
|
||||
foreach (lang ${_languages})
|
||||
if (NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/translations/${_target}_${lang}.ts" OR UPDATE_TRANSLATIONS_${_TARGET})
|
||||
list (APPEND _new_ts_files "translations/${_target}_${lang}.ts")
|
||||
else ()
|
||||
list (APPEND _ts_files "translations/${_target}_${lang}.ts")
|
||||
endif ()
|
||||
endforeach ()
|
||||
|
||||
|
||||
set (_qm_files)
|
||||
if ( _new_ts_files )
|
||||
qt4_create_translation(_qm_files ${_sources} ${_new_ts_files})
|
||||
endif ()
|
||||
|
||||
if ( _ts_files )
|
||||
qt4_add_translation(_qm_files2 ${_ts_files})
|
||||
list (APPEND _qm_files ${_qm_files2})
|
||||
endif ()
|
||||
|
||||
# create a target for the translation files ( and object files )
|
||||
# Use this target, to update only the translations
|
||||
add_custom_target (translations_target_${_target} DEPENDS ${_qm_files})
|
||||
|
||||
# Build translations with the application
|
||||
add_dependencies(${_target} translations_target_${_target} )
|
||||
|
||||
if (NOT EXISTS ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Translations)
|
||||
file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Translations )
|
||||
endif ()
|
||||
|
||||
foreach (_qm ${_qm_files})
|
||||
get_filename_component (_qm_name "${_qm}" NAME)
|
||||
add_custom_command (TARGET translations_target_${_target} POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E
|
||||
copy_if_different
|
||||
${_qm}
|
||||
${CMAKE_BINARY_DIR}/Build/${ACG_PROJECT_DATADIR}/Translations/${_qm_name})
|
||||
endforeach ()
|
||||
|
||||
if (NOT ACG_PROJECT_MACOS_BUNDLE OR NOT APPLE)
|
||||
install (FILES ${_qm_files} DESTINATION "${ACG_PROJECT_DATADIR}/Translations")
|
||||
endif ()
|
||||
endfunction ()
|
||||
|
||||
@@ -45,10 +45,12 @@ 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 )
|
||||
@@ -58,23 +60,8 @@ if (UNIX)
|
||||
################################################################################
|
||||
|
||||
# add our standard flags for Template inclusion
|
||||
list(APPEND ADDITIONAL_CXX_DEBUG_FLAGS "-DINCLUDE_TEMPLATES" )
|
||||
list(APPEND ADDITIONAL_CXX_RELEASE_FLAGS "-DINCLUDE_TEMPLATES" )
|
||||
list(APPEND ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS "-DINCLUDE_TEMPLATES" )
|
||||
|
||||
# add our standard flags for Template inclusion
|
||||
list(APPEND ADDITIONAL_C_DEBUG_FLAGS "-DINCLUDE_TEMPLATES" )
|
||||
list(APPEND ADDITIONAL_C_RELEASE_FLAGS "-DINCLUDE_TEMPLATES" )
|
||||
list(APPEND ADDITIONAL_C_RELWITHDEBINFO_FLAGS "-DINCLUDE_TEMPLATES" )
|
||||
|
||||
# Deprecated setting. Remove in future release, as the default template depth
|
||||
# should be enough with state of the art compilers
|
||||
# # Increase the template depth as this might be exceeded from time to time
|
||||
# IF( NOT CMAKE_SYSTEM MATCHES "SunOS*")
|
||||
# list(APPEND ADDITIONAL_CXX_DEBUG_FLAGS "-ftemplate-depth-100" )
|
||||
# list(APPEND ADDITIONAL_CXX_RELEASE_FLAGS "-ftemplate-depth-100" )
|
||||
# list(APPEND ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS "-ftemplate-depth-100" )
|
||||
# ENDIF()
|
||||
list(APPEND ADDITIONAL_CXX_FLAGS "-DINCLUDE_TEMPLATES" )
|
||||
list(APPEND ADDITIONAL_C_FLAGS "-DINCLUDE_TEMPLATES" )
|
||||
|
||||
################################################################################
|
||||
# OS Defines
|
||||
@@ -117,13 +104,23 @@ if (UNIX)
|
||||
|
||||
endif ( NOT COMPILER_WARNINGS )
|
||||
|
||||
list(APPEND ADDITIONAL_CXX_DEBUG_FLAGS ${COMPILER_WARNINGS} )
|
||||
list(APPEND ADDITIONAL_CXX_RELEASE_FLAGS ${COMPILER_WARNINGS} )
|
||||
list(APPEND ADDITIONAL_CXX_RELWITHDEBINFO_FLAGS ${COMPILER_WARNINGS} )
|
||||
list(APPEND ADDITIONAL_CXX_FLAGS ${COMPILER_WARNINGS} )
|
||||
list(APPEND ADDITIONAL_C_FLAGS ${COMPILER_WARNINGS} )
|
||||
|
||||
list(APPEND ADDITIONAL_C_DEBUG_FLAGS ${COMPILER_WARNINGS} )
|
||||
list(APPEND ADDITIONAL_C_RELEASE_FLAGS ${COMPILER_WARNINGS} )
|
||||
list(APPEND ADDITIONAL_C_RELWITHDEBINFO_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
|
||||
@@ -156,51 +153,51 @@ if (UNIX)
|
||||
################################################################################
|
||||
|
||||
# Add the debug flags
|
||||
foreach( flag ${ADDITIONAL_CXX_DEBUG_FLAGS} )
|
||||
if( NOT CMAKE_CXX_FLAGS_DEBUG MATCHES "${flag}" )
|
||||
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_RELEASE_FLAGS} )
|
||||
if( NOT CMAKE_CXX_FLAGS_RELEASE MATCHES "${flag}" )
|
||||
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_RELWITHDEBINFO_FLAGS} )
|
||||
if( NOT CMAKE_CXX_FLAGS_RELWITHDEBINFO MATCHES "${flag}" )
|
||||
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_DEBUG_FLAGS} )
|
||||
if( NOT CMAKE_C_FLAGS_DEBUG MATCHES "${flag}" )
|
||||
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_RELEASE_FLAGS} )
|
||||
if( NOT CMAKE_C_FLAGS_RELEASE MATCHES "${flag}" )
|
||||
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_RELWITHDEBINFO_FLAGS} )
|
||||
if( NOT CMAKE_C_FLAGS_RELWITHDEBINFO MATCHES "${flag}" )
|
||||
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()
|
||||
|
||||
#TODO : Test and remove it?!
|
||||
IF( CMAKE_SYSTEM MATCHES "SunOS*")
|
||||
set (CMAKE_CFLAGS_RELEASE "-xO3")
|
||||
set (CMAKE_CXX_FLAGS_RELEASE "-xO3")
|
||||
endif ( CMAKE_SYSTEM MATCHES "SunOS*" )
|
||||
|
||||
endif ()
|
||||
|
||||
@@ -18,8 +18,9 @@
|
||||
# author Jan Woetzel 2004-2006
|
||||
# www.mip.informatik.uni-kiel.de/~jw
|
||||
|
||||
|
||||
if ( NOT DOXYGEN_FOUND)
|
||||
FIND_PACKAGE(Doxygen)
|
||||
endif()
|
||||
|
||||
IF (DOXYGEN_FOUND)
|
||||
|
||||
|
||||
@@ -30,12 +30,14 @@ function (acg_print_configure_header _id _name)
|
||||
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 ()
|
||||
|
||||
105
cmake/ACGQt.cmake
Normal file
105
cmake/ACGQt.cmake
Normal file
@@ -0,0 +1,105 @@
|
||||
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 ()
|
||||
70
cmake/FindEIGEN3.cmake
Normal file
70
cmake/FindEIGEN3.cmake
Normal file
@@ -0,0 +1,70 @@
|
||||
# - 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)
|
||||
@@ -1,75 +0,0 @@
|
||||
# - Try to find GLEW
|
||||
# Once done this will define
|
||||
#
|
||||
# GLEW_FOUND - system has GLEW
|
||||
# GLEW_INCLUDE_DIR - the GLEW include directory
|
||||
# GLEW_LIBRARY_DIR - where the libraries are
|
||||
# GLEW_LIBRARY - Link these to use GLEW
|
||||
#
|
||||
|
||||
IF (GLEW_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
SET(GLEW_FIND_QUIETLY TRUE)
|
||||
ENDIF (GLEW_INCLUDE_DIR)
|
||||
|
||||
if( WIN32 )
|
||||
|
||||
# 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/")
|
||||
endif()
|
||||
|
||||
if( MSVC80 )
|
||||
set( COMPILER_PATH "C:/Program\ Files/Microsoft\ Visual\ Studio\ 8/VC" )
|
||||
endif( MSVC80 )
|
||||
if( MSVC71 )
|
||||
set( COMPILER_PATH "C:/Program\ Files/Microsoft\ Visual\ Studio\ .NET\ 2003/Vc7" )
|
||||
endif( MSVC71 )
|
||||
|
||||
FIND_PATH( GLEW_INCLUDE_DIR gl/glew.h gl/wglew.h
|
||||
PATHS "${CMAKE_WINDOWS_LIBS_DIR}/glew/include"
|
||||
"${CMAKE_WINDOWS_LIBS_DIR}/glew-1.6.0/include"
|
||||
${COMPILER_PATH}/PlatformSDK/Include
|
||||
"${VS_SEARCH_PATH}glew-1.10.0/include")
|
||||
|
||||
SET( GLEW_NAMES glew32 )
|
||||
FIND_LIBRARY( GLEW_LIBRARY
|
||||
NAMES ${GLEW_NAMES}
|
||||
PATHS "${CMAKE_WINDOWS_LIBS_DIR}/glew/lib"
|
||||
"${CMAKE_WINDOWS_LIBS_DIR}/glew-1.6.0/lib"
|
||||
${COMPILER_PATH}/PlatformSDK/Lib
|
||||
"${VS_SEARCH_PATH}glew-1.10.0/lib" )
|
||||
|
||||
else( WIN32 )
|
||||
FIND_PATH( GLEW_INCLUDE_DIR GL/glew.h GL/wglew.h
|
||||
PATHS /usr/local/include /usr/include )
|
||||
SET( GLEW_NAMES glew GLEW )
|
||||
FIND_LIBRARY( GLEW_LIBRARY
|
||||
NAMES ${GLEW_NAMES}
|
||||
PATHS /usr/lib /usr/local/lib )
|
||||
endif( WIN32 )
|
||||
|
||||
GET_FILENAME_COMPONENT( GLEW_LIBRARY_DIR ${GLEW_LIBRARY} PATH )
|
||||
|
||||
IF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
|
||||
SET(GLEW_FOUND TRUE)
|
||||
ELSE (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
|
||||
SET( GLEW_FOUND FALSE )
|
||||
SET( GLEW_LIBRARY_DIR )
|
||||
ENDIF (GLEW_INCLUDE_DIR AND GLEW_LIBRARY)
|
||||
|
||||
@@ -1,121 +0,0 @@
|
||||
# - try to find glut library and include files
|
||||
# GLUT_INCLUDE_DIR, where to find GL/glut.h, etc.
|
||||
# GLUT_LIBRARIES, the libraries to link against
|
||||
# GLUT_FOUND, If false, do not try to use GLUT.
|
||||
# Also defined, but not for general use are:
|
||||
# GLUT_glut_LIBRARY = the full path to the glut library.
|
||||
# GLUT_Xmu_LIBRARY = the full path to the Xmu library.
|
||||
# GLUT_Xi_LIBRARY = the full path to the Xi Library.
|
||||
|
||||
#=============================================================================
|
||||
# Copyright 2001-2009 Kitware, Inc.
|
||||
#
|
||||
# Distributed under the OSI-approved BSD License (the "License");
|
||||
# see accompanying file Copyright.txt for details.
|
||||
#
|
||||
# This software is distributed WITHOUT ANY WARRANTY; without even the
|
||||
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
|
||||
# See the License for more information.
|
||||
#=============================================================================
|
||||
# (To distributed this file outside of CMake, substitute the full
|
||||
# License text for the above reference.)
|
||||
|
||||
IF (WIN32)
|
||||
|
||||
# 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/")
|
||||
endif()
|
||||
|
||||
|
||||
FIND_PATH( GLUT_INCLUDE_DIR NAMES GL/glut.h
|
||||
PATHS ${GLUT_ROOT_PATH}/include
|
||||
"${CMAKE_WINDOWS_LIBS_DIR}/glut-3.7/include"
|
||||
"${VS_SEARCH_PATH}/freeglut-3.0.0/include"
|
||||
"${VS_SEARCH_PATH}/freeglut-2.8.1/include" )
|
||||
|
||||
FIND_LIBRARY( GLUT_glut_LIBRARY NAMES glut32 glut freeglut
|
||||
PATHS
|
||||
${OPENGL_LIBRARY_DIR}
|
||||
${GLUT_ROOT_PATH}/Release
|
||||
"${CMAKE_WINDOWS_LIBS_DIR}/glut-3.7/lib"
|
||||
"${VS_SEARCH_PATH}/freeglut-3.0.0/lib"
|
||||
"${VS_SEARCH_PATH}/freeglut-2.8.1/lib"
|
||||
)
|
||||
|
||||
GET_FILENAME_COMPONENT( GLUT_LIBRARY_DIR ${GLUT_glut_LIBRARY} PATH )
|
||||
|
||||
ELSE (WIN32)
|
||||
|
||||
IF (APPLE)
|
||||
# These values for Apple could probably do with improvement.
|
||||
FIND_PATH( GLUT_INCLUDE_DIR glut.h
|
||||
/System/Library/Frameworks/GLUT.framework/Versions/A/Headers
|
||||
${OPENGL_LIBRARY_DIR}
|
||||
)
|
||||
SET(GLUT_glut_LIBRARY "-framework GLUT" CACHE STRING "GLUT library for OSX")
|
||||
SET(GLUT_cocoa_LIBRARY "-framework Cocoa" CACHE STRING "Cocoa framework for OSX")
|
||||
ELSE (APPLE)
|
||||
|
||||
FIND_PATH( GLUT_INCLUDE_DIR GL/glut.h
|
||||
/usr/include/GL
|
||||
/usr/openwin/share/include
|
||||
/usr/openwin/include
|
||||
/opt/graphics/OpenGL/include
|
||||
/opt/graphics/OpenGL/contrib/libglut
|
||||
)
|
||||
|
||||
FIND_LIBRARY( GLUT_glut_LIBRARY glut
|
||||
/usr/openwin/lib
|
||||
)
|
||||
|
||||
FIND_LIBRARY( GLUT_Xi_LIBRARY Xi
|
||||
/usr/openwin/lib
|
||||
)
|
||||
|
||||
FIND_LIBRARY( GLUT_Xmu_LIBRARY Xmu
|
||||
/usr/openwin/lib
|
||||
)
|
||||
|
||||
ENDIF (APPLE)
|
||||
|
||||
ENDIF (WIN32)
|
||||
|
||||
SET( GLUT_FOUND "NO" )
|
||||
IF(GLUT_INCLUDE_DIR)
|
||||
IF(GLUT_glut_LIBRARY)
|
||||
|
||||
SET( GLUT_LIBRARIES
|
||||
${GLUT_glut_LIBRARY}
|
||||
${GLUT_cocoa_LIBRARY}
|
||||
)
|
||||
SET( GLUT_FOUND "YES" )
|
||||
|
||||
#The following deprecated settings are for backwards compatibility with CMake1.4
|
||||
SET (GLUT_LIBRARY ${GLUT_LIBRARIES})
|
||||
SET (GLUT_INCLUDE_PATH ${GLUT_INCLUDE_DIR})
|
||||
|
||||
ENDIF(GLUT_glut_LIBRARY)
|
||||
ENDIF(GLUT_INCLUDE_DIR)
|
||||
|
||||
MARK_AS_ADVANCED(
|
||||
GLUT_INCLUDE_DIR
|
||||
GLUT_glut_LIBRARY
|
||||
GLUT_Xmu_LIBRARY
|
||||
GLUT_Xi_LIBRARY
|
||||
)
|
||||
@@ -1,116 +0,0 @@
|
||||
# Locate and configure the Google Test libraries.
|
||||
#
|
||||
# Defines the following variable:
|
||||
#
|
||||
# GTEST_FOUND - Found the Google Test libraries
|
||||
# GTEST_INCLUDE_DIRS - The directories needed on the include paths
|
||||
# GTEST_LIBRARIES - The libraries to link to test executables
|
||||
# GTEST_MAIN_LIBRARIES - The libraries to link for automatic main() provision
|
||||
#
|
||||
# Copyright 2008 Chandler Carruth
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
|
||||
# use this file except in compliance with the License. You may obtain a copy
|
||||
# of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||
# License for the specific language governing permissions and limitations
|
||||
# under the License.
|
||||
|
||||
if(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES)
|
||||
set(GTEST_FOUND true)
|
||||
else(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES)
|
||||
set(GTEST_PREFIX "" CACHE PATH "Installation prefix for Google Test")
|
||||
if(GTEST_PREFIX)
|
||||
find_path(_GTEST_INCLUDE_DIR "gtest/gtest.h"
|
||||
PATHS "${GTEST_PREFIX}/include"
|
||||
NO_DEFAULT_PATH)
|
||||
find_library(_GTEST_LIBRARY gtest
|
||||
PATHS "${GTEST_PREFIX}/lib"
|
||||
NO_DEFAULT_PATH)
|
||||
find_library(_GTEST_MAIN_LIBRARY gtest_main
|
||||
PATHS "${GTEST_PREFIX}/lib"
|
||||
NO_DEFAULT_PATH)
|
||||
|
||||
if ( _GTEST_LIBRARY )
|
||||
get_filename_component(_GTEST_LIBRARY_DIR ${_GTEST_LIBRARY} PATH CACHE )
|
||||
endif()
|
||||
else(GTEST_PREFIX)
|
||||
find_path(_GTEST_INCLUDE_DIR "gtest/gtest.h"
|
||||
PATHS
|
||||
~/sw/gtest-1.8.0/include
|
||||
~/sw/gtest-1.7.0/include
|
||||
~/sw/gtest/include
|
||||
/ACG/acgdev/gcc-x86_64/gtest/include
|
||||
/opt/local/include
|
||||
/usr/local/include
|
||||
/usr/include
|
||||
"C:/libs/win32/gtest/include"
|
||||
NO_DEFAULT_PATH )
|
||||
find_library(_GTEST_LIBRARY gtest
|
||||
PATHS
|
||||
~/sw/gtest-1.8.0/lib
|
||||
~/sw/gtest-1.7.0/lib
|
||||
~/sw/gtest/lib
|
||||
/ACG/acgdev/gcc-x86_64/gtest/lib
|
||||
/opt/local/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
"C:/libs/win32/gtest/lib"
|
||||
NO_DEFAULT_PATH )
|
||||
find_library(_GTEST_MAIN_LIBRARY gtest_main
|
||||
PATHS
|
||||
~/sw/gtest-1.8.0/lib
|
||||
~/sw/gtest-1.7.0/lib
|
||||
~/sw/gtest/lib
|
||||
/ACG/acgdev/gcc-x86_64/gtest/lib
|
||||
/opt/local/lib
|
||||
/usr/local/lib
|
||||
/usr/lib
|
||||
"C:/libs/win32/gtest/lib"
|
||||
NO_DEFAULT_PATH )
|
||||
|
||||
if ( _GTEST_LIBRARY )
|
||||
get_filename_component(_GTEST_LIBRARY_DIR ${_GTEST_LIBRARY} PATH CACHE )
|
||||
endif()
|
||||
|
||||
endif(GTEST_PREFIX)
|
||||
if(_GTEST_INCLUDE_DIR AND _GTEST_LIBRARY AND _GTEST_MAIN_LIBRARY)
|
||||
set(GTEST_FOUND true)
|
||||
set(GTEST_INCLUDE_DIRS ${_GTEST_INCLUDE_DIR} CACHE PATH
|
||||
"Include directories for Google Test framework")
|
||||
|
||||
if ( NOT WIN32 )
|
||||
set(GTEST_LIBRARIES ${_GTEST_LIBRARY} CACHE FILEPATH
|
||||
"Libraries to link for Google Test framework")
|
||||
set(GTEST_MAIN_LIBRARIES ${_GTEST_MAIN_LIBRARY} CACHE FILEPATH
|
||||
"Libraries to link for Google Test automatic main() definition")
|
||||
else()
|
||||
set(GTEST_LIBRARIES "optimized;gtest;debug;gtestd" CACHE FILEPATH
|
||||
"Libraries to link for Google Test framework")
|
||||
set(GTEST_MAIN_LIBRARIES "optimized;gtest_main;debug;gtest_maind" CACHE FILEPATH
|
||||
"Libraries to link for Google Test automatic main() definition")
|
||||
endif()
|
||||
|
||||
# Macro required to use google test with vs2012
|
||||
if ( CMAKE_GENERATOR MATCHES "^Visual Studio 11.*" )
|
||||
add_definitions(-D_VARIADIC_MAX=10)
|
||||
endif()
|
||||
|
||||
|
||||
set(GTEST_LIBRARY_DIR ${_GTEST_LIBRARY_DIR} CACHE FILEPATH
|
||||
"Library dir containing Google Test libraries")
|
||||
mark_as_advanced(GTEST_INCLUDE_DIRS GTEST_LIBRARIES GTEST_MAIN_LIBRARIES GTEST_LIBRARY_DIR )
|
||||
if(NOT GoogleTest_FIND_QUIETLY)
|
||||
message(STATUS "Found Google Test: ${GTEST_LIBRARIES}")
|
||||
endif(NOT GoogleTest_FIND_QUIETLY)
|
||||
else(_GTEST_INCLUDE_DIR AND _GTEST_LIBRARY AND _GTEST_MAIN_LIBRARY)
|
||||
if(GoogleTest_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find the Google Test framework")
|
||||
endif(GoogleTest_FIND_REQUIRED)
|
||||
endif(_GTEST_INCLUDE_DIR AND _GTEST_LIBRARY AND _GTEST_MAIN_LIBRARY)
|
||||
endif(GTEST_INCLUDE_DIRS AND GTEST_LIBRARIES AND GTEST_MAIN_LIBRARIES)
|
||||
@@ -1,108 +0,0 @@
|
||||
# - Finds OpenMP support
|
||||
# This module can be used to detect OpenMP support in a compiler.
|
||||
# If the compiler supports OpenMP, the flags required to compile with
|
||||
# openmp support are set.
|
||||
#
|
||||
# The following variables are set:
|
||||
# OpenMP_C_FLAGS - flags to add to the C compiler for OpenMP support
|
||||
# OpenMP_CXX_FLAGS - flags to add to the CXX compiler for OpenMP support
|
||||
# OPENMP_FOUND - true if openmp is detected
|
||||
#
|
||||
# Supported compilers can be found at http://openmp.org/wp/openmp-compilers/
|
||||
|
||||
|
||||
# Copyright 2008, 2009 <André Rigland Brodtkorb> Andre.Brodtkorb@ifi.uio.no
|
||||
#
|
||||
# Redistribution AND use is allowed according to the terms of the New
|
||||
# BSD license.
|
||||
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
|
||||
|
||||
|
||||
include(CheckCSourceCompiles)
|
||||
include(CheckCXXSourceCompiles)
|
||||
include(FindPackageHandleStandardArgs)
|
||||
|
||||
set(OpenMP_C_FLAG_CANDIDATES
|
||||
#Gnu
|
||||
"-fopenmp"
|
||||
#Microsoft Visual Studio
|
||||
"/openmp"
|
||||
#Intel windows
|
||||
"-Qopenmp"
|
||||
#Intel
|
||||
"-openmp"
|
||||
#Empty, if compiler automatically accepts openmp
|
||||
" "
|
||||
#Sun
|
||||
"-xopenmp"
|
||||
#HP
|
||||
"+Oopenmp"
|
||||
#IBM XL C/c++
|
||||
"-qsmp"
|
||||
#Portland Group
|
||||
"-mp"
|
||||
)
|
||||
set(OpenMP_CXX_FLAG_CANDIDATES ${OpenMP_C_FLAG_CANDIDATES})
|
||||
|
||||
# sample openmp source code to test
|
||||
set(OpenMP_C_TEST_SOURCE
|
||||
"
|
||||
#include <omp.h>
|
||||
int main() {
|
||||
#ifdef _OPENMP
|
||||
return 0;
|
||||
#else
|
||||
breaks_on_purpose
|
||||
#endif
|
||||
}
|
||||
")
|
||||
# use the same source for CXX as C for now
|
||||
set(OpenMP_CXX_TEST_SOURCE ${OpenMP_C_TEST_SOURCE})
|
||||
# if these are set then do not try to find them again,
|
||||
# by avoiding any try_compiles for the flags
|
||||
if(DEFINED OpenMP_C_FLAGS AND DEFINED OpenMP_CXX_FLAGS)
|
||||
set(OpenMP_C_FLAG_CANDIDATES)
|
||||
set(OpenMP_CXX_FLAG_CANDIDATES)
|
||||
endif(DEFINED OpenMP_C_FLAGS AND DEFINED OpenMP_CXX_FLAGS)
|
||||
|
||||
# check c compiler
|
||||
foreach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
|
||||
set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||
set(CMAKE_REQUIRED_FLAGS "${FLAG}")
|
||||
set(OpenMP_C_FLAG_DETECTED)
|
||||
message(STATUS "Try OpenMP C flag = [${FLAG}]")
|
||||
check_c_source_compiles("${OpenMP_CXX_TEST_SOURCE}" OpenMP_C_FLAG_DETECTED)
|
||||
set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
|
||||
if(OpenMP_C_FLAG_DETECTED)
|
||||
set(OpenMP_C_FLAGS_INTERNAL "${FLAG}")
|
||||
break()
|
||||
endif(OpenMP_C_FLAG_DETECTED)
|
||||
endforeach(FLAG ${OpenMP_C_FLAG_CANDIDATES})
|
||||
|
||||
# check cxx compiler
|
||||
foreach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES})
|
||||
set(SAFE_CMAKE_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
|
||||
set(CMAKE_REQUIRED_FLAGS "${FLAG}")
|
||||
set(OpenMP_CXX_FLAG_DETECTED)
|
||||
message(STATUS "Try OpenMP CXX flag = [${FLAG}]")
|
||||
check_cxx_source_compiles("${OpenMP_C_TEST_SOURCE}" OpenMP_CXX_FLAG_DETECTED)
|
||||
set(CMAKE_REQUIRED_FLAGS "${SAFE_CMAKE_REQUIRED_FLAGS}")
|
||||
if(OpenMP_CXX_FLAG_DETECTED)
|
||||
set(OpenMP_CXX_FLAGS_INTERNAL "${FLAG}")
|
||||
break()
|
||||
endif(OpenMP_CXX_FLAG_DETECTED)
|
||||
endforeach(FLAG ${OpenMP_CXX_FLAG_CANDIDATES})
|
||||
|
||||
set(OpenMP_C_FLAGS "${OpenMP_C_FLAGS_INTERNAL}"
|
||||
CACHE STRING "C compiler flags for OpenMP parallization")
|
||||
|
||||
set(OpenMP_CXX_FLAGS "${OpenMP_CXX_FLAGS_INTERNAL}"
|
||||
CACHE STRING "C++ compiler flags for OpenMP parallization")
|
||||
# handle the standard arguments for find_package
|
||||
find_package_handle_standard_args(OpenMP DEFAULT_MSG
|
||||
OpenMP_C_FLAGS OpenMP_CXX_FLAGS )
|
||||
|
||||
mark_as_advanced(
|
||||
OpenMP_C_FLAGS
|
||||
OpenMP_CXX_FLAGS
|
||||
)
|
||||
@@ -63,6 +63,10 @@ IF (NOT OPENMESH_FOUND)
|
||||
"${CMAKE_SOURCE_DIR}/OpenMesh/src/OpenMesh"
|
||||
"${CMAKE_SOURCE_DIR}/libs_required/OpenMesh/src/OpenMesh"
|
||||
"${CMAKE_SOURCE_DIR}/../OpenMesh/src/OpenMesh"
|
||||
"C:/Program Files/OpenMesh 8.1"
|
||||
"C:/Program Files/OpenMesh 8.0"
|
||||
"C:/Program Files/OpenMesh 7.2"
|
||||
"C:/Program Files/OpenMesh 7.1"
|
||||
"C:/Program Files/OpenMesh 7.0"
|
||||
"C:/Program Files/OpenMesh 6.3"
|
||||
"C:/Program Files/OpenMesh 6.2"
|
||||
@@ -82,6 +86,9 @@ IF (NOT OPENMESH_FOUND)
|
||||
"C:/Program Files/OpenMesh 2.4.1"
|
||||
"C:/Program Files/OpenMesh 2.4"
|
||||
"C:/Program Files/OpenMesh 2.0/include"
|
||||
"C:/libs/OpenMesh 8.1"
|
||||
"C:/libs/OpenMesh 8.0"
|
||||
"C:/libs/OpenMesh 7.1"
|
||||
"C:/libs/OpenMesh 7.0"
|
||||
"C:/libs/OpenMesh 6.3"
|
||||
"C:/libs/OpenMesh 6.2"
|
||||
|
||||
@@ -53,9 +53,6 @@ include (BundleUtilities)
|
||||
# list(APPEND _qtdirs "${_dir}")
|
||||
# endforeach ()
|
||||
|
||||
# # Get library paths
|
||||
# get_filename_component(_GlutDir "@GLUT_glut_LIBRARY@" PATH)
|
||||
|
||||
# # fix all dependencies
|
||||
# fixup_bundle (@CMAKE_BINARY_DIR@/Build/bin/QtViewer "${_qtplugins}" "/usr/lib;${_qtdirs};${_GlutDir}")
|
||||
#
|
||||
|
||||
@@ -17,11 +17,8 @@ endfunction(gp_item_default_embedded_path_override)
|
||||
|
||||
include (BundleUtilities)
|
||||
|
||||
# Get library paths
|
||||
get_filename_component(_GlutDir "@GLUT_glut_LIBRARY@" PATH)
|
||||
|
||||
# fix all dependencies
|
||||
fixup_bundle ("@CMAKE_BINARY_DIR@/Build/Smoothing.exe" "" "${_GlutDir};@QT_BINARY_DIR@")
|
||||
fixup_bundle ("@CMAKE_BINARY_DIR@/Build/Smoothing.exe" "" "@QT_BINARY_DIR@")
|
||||
|
||||
|
||||
|
||||
|
||||
11
openmesh.pc.in
Normal file
11
openmesh.pc.in
Normal file
@@ -0,0 +1,11 @@
|
||||
prefix=@DEST_DIR@
|
||||
exec_prefix=${prefix}
|
||||
libdir=${prefix}/lib
|
||||
includedir=${prefix}/include
|
||||
|
||||
Name: libOpenMesh
|
||||
Description: OpenMesh library
|
||||
Version: @OPENMESH_VERSION_MAJOR@.@OPENMESH_VERSION_MINOR@
|
||||
|
||||
Libs: -L${libdir} @PRIVATE_LIBS@
|
||||
Cflags: -I${includedir}
|
||||
@@ -1,134 +0,0 @@
|
||||
|
||||
################################################################################
|
||||
# This is a library
|
||||
################################################################################
|
||||
|
||||
|
||||
################################################################################
|
||||
# Needed Qt packages and build plugin
|
||||
################################################################################
|
||||
|
||||
CONFIG += qt uitools opengl thread debug_and_release
|
||||
|
||||
QT += opengl
|
||||
|
||||
################################################################################
|
||||
# Add toplevel directory to include path
|
||||
# TOPDIR has to be specified in a .qmake.cache file in your projects toplevel
|
||||
# directory
|
||||
################################################################################
|
||||
INCLUDEPATH = $$quote( $$TOPDIR/src )
|
||||
DEPENDPATH = $$quote( $${TOPDIR}/src )
|
||||
|
||||
################################################################################
|
||||
# Define header Extension
|
||||
# This will also override the header extension for uic output
|
||||
# ( Do not change to += otherwise uic output will end with .h ! )
|
||||
################################################################################
|
||||
QMAKE_EXT_H = .hh .h
|
||||
|
||||
################################################################################
|
||||
# Architecture detection
|
||||
################################################################################
|
||||
include( architecture.include )
|
||||
|
||||
################################################################################
|
||||
# Helper functions
|
||||
################################################################################
|
||||
include( functions.include )
|
||||
|
||||
################################################################################
|
||||
# Custom settings for compiler flags and similar
|
||||
################################################################################
|
||||
include( compiler.include)
|
||||
|
||||
################################################################################
|
||||
# Extra target definitions
|
||||
################################################################################
|
||||
include( targets.include )
|
||||
|
||||
################################################################################
|
||||
# Global package definitions
|
||||
################################################################################
|
||||
include( packages/packages.$${SYSTEMTYPE} )
|
||||
|
||||
################################################################################
|
||||
# Local package definitions
|
||||
# These lines will include a file from a .qmake directory inside your home.
|
||||
# this file will overwrite existing setting
|
||||
################################################################################
|
||||
|
||||
unix {
|
||||
HOME=$$system(echo ~)
|
||||
}
|
||||
#else {
|
||||
#message( TODO : Define Home in Windows )
|
||||
#}
|
||||
|
||||
exists( $${HOME}/.qmake/config.$${SYSTEMTYPE} ) {
|
||||
include( $${HOME}/.qmake/config.$${SYSTEMTYPE} )
|
||||
}
|
||||
|
||||
################################################################################
|
||||
# Set standard build directories
|
||||
# ( Everything generated while compiling will go # into a per architecture
|
||||
# directory )
|
||||
################################################################################
|
||||
OBJECTS_DIR = tmp/$$BUILDDIRECTORY
|
||||
MOC_DIR = tmp/$$BUILDDIRECTORY
|
||||
UI_DIR = tmp/$$BUILDDIRECTORY
|
||||
|
||||
################################################################################
|
||||
# type definitions
|
||||
################################################################################
|
||||
|
||||
defineTest(Library) {
|
||||
unix{
|
||||
TEMPLATE = lib
|
||||
contains( OPERATING_SYSTEM, Darwin) {
|
||||
CONFIG -= static
|
||||
export(CONFIG)
|
||||
}
|
||||
}
|
||||
win32 {
|
||||
TEMPLATE = vclib
|
||||
}
|
||||
export(TEMPLATE)
|
||||
DESTDIR = lib/$$BUILDDIRECTORY
|
||||
export(DESTDIR)
|
||||
defineTargets()
|
||||
UI_DIR = include
|
||||
export(UI_DIR)
|
||||
}
|
||||
|
||||
defineTest(Application) {
|
||||
unix {
|
||||
TEMPLATE = app
|
||||
}
|
||||
win32 {
|
||||
TEMPLATE = vcapp
|
||||
}
|
||||
macx {
|
||||
CONFIG -= app_bundle
|
||||
export( CONFIG )
|
||||
}
|
||||
export(TEMPLATE)
|
||||
DESTDIR = $$BUILDDIRECTORY
|
||||
export(DESTDIR)
|
||||
defineTargets()
|
||||
}
|
||||
|
||||
|
||||
defineTest(Subdirs) {
|
||||
unix {
|
||||
TEMPLATE = subdirs
|
||||
}
|
||||
win32 {
|
||||
TEMPLATE = vcsubdirs
|
||||
}
|
||||
export(TEMPLATE)
|
||||
CONFIG += ordered
|
||||
export(CONFIG)
|
||||
defineTargets()
|
||||
}
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
|
||||
################################################################################
|
||||
# Architecture detection
|
||||
# The following Variables are defined by this include:
|
||||
# OPERATING_SYSTEM : Debian / Fedora / Windows
|
||||
# ARCHITECTURE : 32 / 64
|
||||
# MODE : Debug / Release
|
||||
# BUILDDIRECTORY : Concat of all above variables sesparated by underscores e.g. Debian_64_debug
|
||||
################################################################################
|
||||
|
||||
unix {
|
||||
|
||||
OPERATING_SYSTEM = UNKNOWN_OS
|
||||
|
||||
exists( /etc/lsb-release ) {
|
||||
OPERATING_SYSTEM = Ubuntu
|
||||
}
|
||||
|
||||
|
||||
exists( /etc/debian_version ) | exists( /etc/debian_release ) {
|
||||
OPERATING_SYSTEM = Debian
|
||||
}
|
||||
|
||||
exists( /etc/fedora-release ) {
|
||||
OPERATING_SYSTEM = Fedora
|
||||
}
|
||||
|
||||
exists( /etc/gentoo-release ) {
|
||||
OPERATING_SYSTEM = Gentoo
|
||||
}
|
||||
|
||||
exists( /etc/lfs-release ) {
|
||||
OPERATING_SYSTEM = Linux_From_Scratch
|
||||
}
|
||||
|
||||
exists( /etc/mandrake-release ) | exists( /etc/mandrakelinux-release ) {
|
||||
OPERATING_SYSTEM = Mandrake
|
||||
}
|
||||
|
||||
exists( /etc/mandriva-release ) {
|
||||
OPERATING_SYSTEM = Mandriva
|
||||
}
|
||||
|
||||
exists( /etc/redhat-release ) | exists( /etc/redhat_version ) {
|
||||
OPERATING_SYSTEM = Redhat
|
||||
}
|
||||
|
||||
exists( /etc/SuSE-release ) | exists( /etc/novell-release ) {
|
||||
OPERATING_SYSTEM = SuSE
|
||||
}
|
||||
|
||||
TEST_DARWIN = $$system(uname -s)
|
||||
contains( TEST_DARWIN, Darwin) {
|
||||
OPERATING_SYSTEM = Darwin
|
||||
DEFINES += ARCH_DARWIN
|
||||
export(DEFINES)
|
||||
}
|
||||
|
||||
HARDWARE_PLATFORM = $$system(uname -a)
|
||||
contains( HARDWARE_PLATFORM, x86_64 ) {
|
||||
# 64-bit Linux
|
||||
ARCHITECTURE = 64
|
||||
} else {
|
||||
# 32-bit Linux
|
||||
ARCHITECTURE = 32
|
||||
}
|
||||
|
||||
contains(TEST_DARWIN, Darwin) {
|
||||
SYSTEMTYPE = Darwin
|
||||
} else {
|
||||
SYSTEMTYPE = Linux
|
||||
}
|
||||
}
|
||||
|
||||
win32 {
|
||||
OPERATING_SYSTEM = Windows
|
||||
ARCHITECTURE = 32
|
||||
SYSTEMTYPE = Windows
|
||||
}
|
||||
|
||||
CONFIG( debug, debug|release ){
|
||||
MODE = Debug
|
||||
} else {
|
||||
MODE = Release
|
||||
}
|
||||
|
||||
BUILDDIRECTORY = $${OPERATING_SYSTEM}_$${ARCHITECTURE}_$${MODE}
|
||||
@@ -1,18 +0,0 @@
|
||||
################################################################################
|
||||
# Custom settings for compiler flags and similar
|
||||
################################################################################
|
||||
|
||||
unix {
|
||||
QMAKE_CC = gcc-4.3
|
||||
QMAKE_CXX = g++-4.3
|
||||
macx {
|
||||
QMAKE_CC = gcc-4.0
|
||||
QMAKE_CXX = g++-4.0
|
||||
}
|
||||
|
||||
QMAKE_CFLAGS_RELEASE = -O3 -DINCLUDE_TEMPLATES -W -Wall -Wno-unused -DNDEBUG
|
||||
QMAKE_CXXFLAGS_RELEASE = -O3 -DINCLUDE_TEMPLATES -ftemplate-depth-100 -W -Wall -Wno-unused -DNDEBUG
|
||||
QMAKE_CFLAGS_DEBUG = -g -DINCLUDE_TEMPLATES -W -Wall -Wno-unused -DDEBUG
|
||||
QMAKE_CXXFLAGS_DEBUG = -g -DINCLUDE_TEMPLATES -ftemplate-depth-100 -W -Wall -Wno-unused -DDEBUG
|
||||
}
|
||||
|
||||
@@ -1,76 +0,0 @@
|
||||
|
||||
################################################################################
|
||||
# functions collecting all headers in the directory
|
||||
################################################################################
|
||||
|
||||
# getFilesFromDir( directory, pattern )
|
||||
# returns a list of all files matching pattern in directory
|
||||
defineReplace(getFilesFromDir) {
|
||||
dirs = $$1
|
||||
pattern = $$2
|
||||
|
||||
files =
|
||||
|
||||
for(dir, dirs) {
|
||||
found = $$files( $${dir}/$${pattern} )
|
||||
files += $$found
|
||||
}
|
||||
|
||||
return( $$files )
|
||||
}
|
||||
|
||||
# addSubdirs(subdirs,deps): Adds directories to the project that depend on
|
||||
# other directories
|
||||
defineTest( addSubdirs ) {
|
||||
for(subdirs, 1) {
|
||||
entries = $$files($$subdirs)
|
||||
for(entry, entries) {
|
||||
name = $$replace(entry, [/\\\\], _)
|
||||
name = $$replace(name, - , _)
|
||||
SUBDIRS += $$name
|
||||
eval ($${name}.subdir = $$entry)
|
||||
for(dep, 2): {
|
||||
tempval = $$replace(dep, [/\\\\], _)
|
||||
eval ($${name}.depends += $$replace(tempval, - , _) )
|
||||
}
|
||||
export ($${name}.subdir)
|
||||
export ($${name}.depends)
|
||||
}
|
||||
}
|
||||
export (SUBDIRS)
|
||||
}
|
||||
|
||||
# given a list of paths and a libname this function checks if the lib is there
|
||||
# adds the path and returns true if found otherwise false
|
||||
defineTest( addLib ) {
|
||||
dirs = $$1
|
||||
name = $$2
|
||||
|
||||
# check for the library
|
||||
for(dir , dirs) {
|
||||
check = $${dir}/lib$${name}.so
|
||||
|
||||
# Found, so use it
|
||||
exists( $$check ) {
|
||||
LIBS *= -L$${dir} -l$$name
|
||||
export(LIBS)
|
||||
return(true)
|
||||
}
|
||||
}
|
||||
|
||||
return(false)
|
||||
}
|
||||
|
||||
|
||||
defineReplace( getCurrentDir ) {
|
||||
DIR = ''
|
||||
unix {
|
||||
DIR = $$system( pwd )
|
||||
}
|
||||
|
||||
win32 {
|
||||
DIR = $$system( cd )
|
||||
}
|
||||
|
||||
return( $$DIR )
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
|
||||
################################################################################
|
||||
# INCLUDE Packages
|
||||
################################################################################
|
||||
|
||||
defineTest( qt ) {
|
||||
QT += opengl network script sql
|
||||
export(QT)
|
||||
}
|
||||
|
||||
defineTest( glew ) {
|
||||
INCLUDEPATH *= /sw/include/GL
|
||||
export(INCLUDEPATH)
|
||||
LIBS *= -L/opt/local/lib/ -lGLEW
|
||||
export(LIBS)
|
||||
}
|
||||
|
||||
defineTest( glut ) {
|
||||
INCLUDEPATH *= /System/Library/Frameworks/GLUT.framework/Headers
|
||||
export(INCLUDEPATH)
|
||||
LIBS *= -framework GLUT
|
||||
export(LIBS)
|
||||
}
|
||||
|
||||
defineTest( openmesh ) {
|
||||
QMAKE_LIBDIR += $${TOPDIR}/lib
|
||||
QMAKE_LIBDIR += $${TOPDIR}/lib
|
||||
|
||||
CONFIG( debug, debug|release ){
|
||||
LIBS += -lOpenMeshToolsd
|
||||
LIBS += -lOpenMeshCored
|
||||
} else {
|
||||
LIBS += -lOpenMeshTools
|
||||
LIBS += -lOpenMeshCore
|
||||
}
|
||||
export(QMAKE_LIBDIR)
|
||||
export(LIBS)
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
|
||||
################################################################################
|
||||
# INCLUDE Packages
|
||||
################################################################################
|
||||
|
||||
defineTest( qt ) {
|
||||
CONFIG *= uitools
|
||||
export(CONFIG)
|
||||
QT += opengl network script sql
|
||||
export(QT)
|
||||
}
|
||||
|
||||
defineTest( qwt ) {
|
||||
INCLUDEPATH *= /usr/include/qwt-qt4/
|
||||
export(INCLUDEPATH)
|
||||
LIBS *= -L/usr/lib/ -lqwt-qt4
|
||||
export(LIBS)
|
||||
}
|
||||
|
||||
defineTest( glew ) {
|
||||
INCLUDEPATH *= /usr/include/GL
|
||||
export(INCLUDEPATH)
|
||||
LIBS *= -L/usr/lib -lGLEW
|
||||
export(LIBS)
|
||||
}
|
||||
|
||||
defineTest( glut ) {
|
||||
INCLUDEPATH *=$${ACG}/OpenGL/include
|
||||
export(INCLUDEPATH)
|
||||
LIBS *= -L/usr/X11R6/lib -lglut
|
||||
export(LIBS)
|
||||
}
|
||||
|
||||
defineTest( openmesh ) {
|
||||
QMAKE_LIBDIR += $${TOPDIR}/lib/
|
||||
QMAKE_LIBDIR += $${TOPDIR}/lib/
|
||||
|
||||
CONFIG( debug, debug|release ){
|
||||
LIBS+= -Wl,-rpath=$${TOPDIR}/lib -lOpenMeshCored
|
||||
LIBS+= -Wl,-rpath=$${TOPDIR}/lib -lOpenMeshToolsd
|
||||
} else {
|
||||
LIBS+= -Wl,-rpath=$${TOPDIR}/lib -lOpenMeshCore
|
||||
LIBS+= -Wl,-rpath=$${TOPDIR}/lib -lOpenMeshTools
|
||||
}
|
||||
|
||||
export(QMAKE_LIBDIR)
|
||||
export(LIBS)
|
||||
}
|
||||
|
||||
defineTest( openmp ) {
|
||||
|
||||
addLib( /usr/lib/gcc/x86_64-linux-gnu/4.3 /usr/lib, gomp ) {
|
||||
|
||||
QMAKE_CXXFLAGS_RELEASE += -fopenmp
|
||||
QMAKE_CXXFLAGS_DEBUG += -fopenmp
|
||||
QMAKE_CFLAGS_RELEASE += -fopenmp
|
||||
QMAKE_CFLAGS_DEBUG += -fopenmp
|
||||
QMAKE_LFLAGS_DEBUG += -fopenmp
|
||||
QMAKE_LFLAGS_RELEASE += -fopenmp
|
||||
|
||||
export(QMAKE_CXXFLAGS_RELEASE)
|
||||
export(QMAKE_CFLAGS_RELEASE)
|
||||
export(QMAKE_CXXFLAGS_DEBUG)
|
||||
export(QMAKE_CFLAGS_DEBUG)
|
||||
export(QMAKE_LFLAGS_DEBUG)
|
||||
export(QMAKE_LFLAGS_RELEASE)
|
||||
} else {
|
||||
message("Unable to find OpenMP lib for linking. OpenMP support will be disabled!!")
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,77 +0,0 @@
|
||||
|
||||
################################################################################
|
||||
# INCLUDE Packages
|
||||
################################################################################
|
||||
|
||||
|
||||
defineTest( glew ) {
|
||||
|
||||
#######################################
|
||||
## Enter here the correct path to GLEW
|
||||
#######################################
|
||||
|
||||
GLEW_PATH = c:\libs\glew
|
||||
|
||||
#######################################
|
||||
|
||||
!exists ( $${GLEW_PATH} ) {
|
||||
error (ERROR: GLEW not found or wrong path entry in OpenMesh\qmake\packages\packages.Windows! Please adjust it to your path!)
|
||||
}
|
||||
INCLUDEPATH *= $${GLEW_PATH}\include
|
||||
export(INCLUDEPATH)
|
||||
LIBS *= -L$${GLEW_PATH}\lib -lglew32
|
||||
export(LIBS)
|
||||
}
|
||||
|
||||
defineTest( qt ) {
|
||||
CONFIG *= uitools
|
||||
export(CONFIG)
|
||||
QT += opengl network script sql
|
||||
export(QT)
|
||||
}
|
||||
|
||||
defineTest( glut ) {
|
||||
|
||||
#######################################
|
||||
## Enter here the correct path to GLUT
|
||||
#######################################
|
||||
|
||||
GLUT_PATH = c:\libs\glut-3.7
|
||||
|
||||
########################################
|
||||
|
||||
!exists ( $${GLUT_PATH} ) {
|
||||
error (ERROR: GLUT not found or wrong path entry in OpenMesh\qmake\packages\packages.Windows! Please adjust it to your path!)
|
||||
}
|
||||
INCLUDEPATH *= $${GLUT_PATH}\include
|
||||
export(INCLUDEPATH)
|
||||
LIBS *= -L$${GLUT_PATH}\lib -lglut32
|
||||
export(LIBS)
|
||||
}
|
||||
|
||||
defineTest( openmp ) {
|
||||
QMAKE_CXXFLAGS_DEBUG += /openmp
|
||||
QMAKE_CXXFLAGS_RELEASE += /openmp
|
||||
export(QMAKE_CXXFLAGS_DEBUG)
|
||||
export(QMAKE_CXXFLAGS_RELEASE)
|
||||
}
|
||||
|
||||
defineTest( openmesh ) {
|
||||
DEFINES += _USE_MATH_DEFINES NOMINMAX
|
||||
|
||||
QMAKE_LIBDIR += $${TOPDIR}/lib/
|
||||
QMAKE_LIBDIR += $${TOPDIR}/lib/
|
||||
|
||||
CONFIG( debug, debug|release ){
|
||||
LIBS+= -L$${TOPDIR}/lib -lOpenMeshCored
|
||||
LIBS+= -L$${TOPDIR}/lib -lOpenMeshToolsd
|
||||
} else {
|
||||
LIBS+= -L$${TOPDIR}/lib -lOpenMeshCore
|
||||
LIBS+= -L$${TOPDIR}/lib -lOpenMeshTools
|
||||
}
|
||||
|
||||
export(DEFINES)
|
||||
export(QMAKE_LIBDIR)
|
||||
export(LIBS)
|
||||
}
|
||||
|
||||
@@ -1,126 +0,0 @@
|
||||
################################################################################
|
||||
# Custom targets
|
||||
################################################################################
|
||||
|
||||
defineTest( defineTargets ) {
|
||||
|
||||
# internal target ... Use allclean instead!
|
||||
# cleanDirs target called by subAllclean.
|
||||
# removes all lib tmp and Builddirectories created by these qmake scripts
|
||||
!contains( QMAKE_EXTRA_TARGETS , cleanDirs) {
|
||||
# Remove temp dirs when doing allclean
|
||||
cleanDirs.target = cleanDirs
|
||||
cleanDirs.commands = rm -rf tmp
|
||||
|
||||
contains( TEMPLATE, app ) {
|
||||
cleanDirs.commands += ; rm -rf $${BUILDDIRECTORY}
|
||||
}
|
||||
|
||||
|
||||
contains( TEMPLATE, lib ) {
|
||||
cleanDirs.commands += ; rm -rf lib
|
||||
}
|
||||
|
||||
export(cleanDirs.target)
|
||||
export(cleanDirs.commands)
|
||||
export(cleanDirs.depends)
|
||||
export(cleanDirs.CONFIG)
|
||||
|
||||
QMAKE_EXTRA_TARGETS += cleanDirs
|
||||
export(QMAKE_EXTRA_TARGETS)
|
||||
}
|
||||
|
||||
# internal target ... Use allclean instead!
|
||||
# main local subAllclean target called by allclean (see below)
|
||||
# this one calls
|
||||
# 1. clean to remove temporary files created
|
||||
# 2. cleanDirs to remove all tmp and lib directories created by qmake
|
||||
# 3. distclean to remove the rest
|
||||
!contains( QMAKE_EXTRA_TARGETS , subAllclean) {
|
||||
# Remove temp dirs when doing allclean
|
||||
subAllclean.target = subAllclean
|
||||
subAllclean.depends = clean cleanDirs distclean
|
||||
|
||||
export(subAllclean.target)
|
||||
export(subAllclean.depends)
|
||||
|
||||
QMAKE_EXTRA_TARGETS += subAllclean
|
||||
export(QMAKE_EXTRA_TARGETS)
|
||||
}
|
||||
|
||||
|
||||
# basic allclean target, will cleate a recursive target calling subAllclean in the subdirectories makefiles
|
||||
!contains( QMAKE_EXTRA_TARGETS , allclean) {
|
||||
allclean.target = allclean
|
||||
allclean.CONFIG = recursive
|
||||
allclean.recurse_target = subAllclean
|
||||
|
||||
export(allclean.target)
|
||||
export(allclean.CONFIG)
|
||||
export(allclean.recurse_target)
|
||||
|
||||
QMAKE_EXTRA_TARGETS += allclean
|
||||
export(QMAKE_EXTRA_TARGETS)
|
||||
}
|
||||
|
||||
!contains( QMAKE_EXTRA_TARGETS , plugindoc ) {
|
||||
exists ( Documentation ) {
|
||||
plugindoc.target = plugindoc
|
||||
PLUGINNAME = $$getCurrentDir()
|
||||
PLUGINNAME = $$section( PLUGINNAME, "/" ,-1, -1)
|
||||
|
||||
unix {
|
||||
plugindoc.commands += rm -rf $${TOPDIR}/OpenFlipper/Docs/User/$$PLUGINNAME ;
|
||||
plugindoc.commands += mkdir $${TOPDIR}/OpenFlipper/Docs/User/$$PLUGINNAME ;
|
||||
plugindoc.commands += cp Documentation/*.html $${TOPDIR}/OpenFlipper/Docs/User/$$PLUGINNAME ;
|
||||
exists ( Documentation/pics ) {
|
||||
plugindoc.commands += cp -r Documentation/pics $${TOPDIR}/OpenFlipper/Docs/User/$$PLUGINNAME ;
|
||||
}
|
||||
}
|
||||
|
||||
win32 {
|
||||
message(Documentaion copy not supported on windows platform)
|
||||
#plugindoc.commands += rmdir /s $${TOPDIR}/OpenFlipper/Docs/User/$$PLUGINNAME ;
|
||||
#plugindoc.commands += mkdir $${TOPDIR}/OpenFlipper/Docs/User/$$PLUGINNAME ;
|
||||
#plugindoc.commands += xcopy /f Documentation/*.html $${TOPDIR}/OpenFlipper/Docs/User/$$PLUGINNAME ;
|
||||
#exists ( Documentation/pics ) {
|
||||
# plugindoc.commands += xcopy /f /s Documentation/pics $${TOPDIR}/OpenFlipper/Docs/User/$$PLUGINNAME ;
|
||||
#}
|
||||
}
|
||||
|
||||
export(plugindoc.target)
|
||||
export(plugindoc.commands)
|
||||
export(plugindoc.depends)
|
||||
|
||||
QMAKE_EXTRA_TARGETS += plugindoc
|
||||
export(QMAKE_EXTRA_TARGETS)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
# target for libraries
|
||||
# this target will copy all headers to an include subdirectory
|
||||
# You have to call this after you defined evertything else for your library.
|
||||
# Otherwise this target doesnt know about the required headers.
|
||||
|
||||
defineTest( installs ) {
|
||||
|
||||
!contains( INSTALLS , includes ) {
|
||||
contains( TEMPLATE, lib ) {
|
||||
|
||||
includes.path = include/
|
||||
includes.extra = cp -f --parents $${HEADERS} include/
|
||||
|
||||
export(includes.path)
|
||||
export(includes.extra)
|
||||
|
||||
INSTALLS *= includes
|
||||
export(INSTALLS)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
1. check files, build on windows,mac,linux with cmake
|
||||
1. check files, build on windows,mac,linux with cmake (-> Done by CI)
|
||||
2. check files with release numbers:
|
||||
cmake/FindOpenMesh.cmake
|
||||
Doc/changelog.docu
|
||||
src/OpenMesh/Core/System/config.h
|
||||
README
|
||||
VERSION
|
||||
3. Tag the current version in the svn (checkout, remove .svn readd as tag)
|
||||
4. Create HTML-Documentation in OpenMesh/Docu/ (!)
|
||||
5. Create tar-ball and zip-archive
|
||||
3. Tag the current version in the git
|
||||
4. Create HTML-Documentation in OpenMesh/Documentation (!)
|
||||
5. Create tar-ball and zip-archive ( -> Done by CI)
|
||||
> tar cvzf OpenMesh-<version>.tar.gz OpenMesh-<version>/
|
||||
> tar cvjf OpenMesh-<version>.tar.bz2 OpenMesh-<version>/
|
||||
> zip -9 -r OpenMesh-<version>.zip OpenMesh-<version>/
|
||||
|
||||
@@ -39,29 +39,18 @@ if ( BUILD_APPS )
|
||||
|
||||
# find needed packages for gui applications
|
||||
find_package (OpenGL)
|
||||
find_package (GLUT)
|
||||
|
||||
# try to use QT5 if possible otherwise stick to QT4
|
||||
set (FORCE_QT4 OFF CACHE BOOL "Use Qt4 even if Qt5 was found")
|
||||
|
||||
# For the apps, we need qt and opengl to build them
|
||||
if (NOT QT5_FOUND AND NOT FORCE_QT4)
|
||||
if (NOT QT5_FOUND)
|
||||
acg_qt5 ()
|
||||
endif()
|
||||
if (NOT QT5_FOUND AND NOT QT4_FOUND)
|
||||
find_package (Qt4 COMPONENTS QtCore QtGui )
|
||||
|
||||
set (QT_USE_QTOPENGL 1)
|
||||
|
||||
include (${QT_USE_FILE})
|
||||
endif ()
|
||||
|
||||
if ("${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles")
|
||||
message(WARNING "GUI Apps are not build with mingw. (TODO)")
|
||||
endif()
|
||||
|
||||
# check for OpenGL and GLUT as our required dependencies
|
||||
if ((QT5_FOUND OR QT4_FOUND) AND OPENGL_FOUND AND GLUT_FOUND AND NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" )
|
||||
# check for OpenGL as our required dependencies
|
||||
if (( QT5_FOUND ) AND OPENGL_FOUND AND NOT "${CMAKE_GENERATOR}" MATCHES "MinGW Makefiles" )
|
||||
|
||||
add_subdirectory (Decimating/DecimaterGui)
|
||||
add_subdirectory (QtViewer)
|
||||
@@ -99,18 +88,14 @@ if ( BUILD_APPS )
|
||||
|
||||
else () # QT ,Opengl or glut not found
|
||||
|
||||
if (NOT QT4_FOUND AND NOT QT5_FOUND)
|
||||
message ("QT 4 and 5 not found! Skipping some apps.")
|
||||
if (NOT QT5_FOUND)
|
||||
message ("QT5 not found! Skipping some apps.")
|
||||
endif ()
|
||||
|
||||
if (NOT OPENGL_FOUND)
|
||||
message ("OpengGL not found! Skipping some apps.")
|
||||
endif ()
|
||||
|
||||
if (NOT GLUT_FOUND)
|
||||
message ("GLUT not found! Skipping some apps.")
|
||||
endif ()
|
||||
|
||||
endif ()
|
||||
|
||||
endif() # Project is OpenMesh standalone
|
||||
|
||||
@@ -39,12 +39,7 @@
|
||||
* *
|
||||
* ========================================================================= */
|
||||
|
||||
/*===========================================================================*\
|
||||
* *
|
||||
* $Revision$ *
|
||||
* $Date$ *
|
||||
* *
|
||||
\*===========================================================================*/
|
||||
|
||||
|
||||
#ifndef CMDOPTION
|
||||
#define CMDOPTION
|
||||
@@ -56,7 +51,7 @@ public:
|
||||
|
||||
typedef T value_type;
|
||||
|
||||
CmdOption(const T& _val) : val_(_val), valid_(true), enabled_(false) { }
|
||||
explicit CmdOption(const T& _val) : val_(_val), valid_(true), enabled_(false) { }
|
||||
CmdOption() : val_(T()),valid_(false), enabled_(false) { }
|
||||
|
||||
// has been set and has a value
|
||||
@@ -79,7 +74,7 @@ public:
|
||||
operator T () const { return val_; }
|
||||
// operator const T& () const { return val_; }
|
||||
|
||||
operator T* () const { return is_valid() ? &val_ : NULL; }
|
||||
operator T* () const { return is_valid() ? &val_ : nullptr; }
|
||||
|
||||
private:
|
||||
|
||||
|
||||
@@ -3,52 +3,33 @@ include (ACGCommon)
|
||||
include_directories (
|
||||
../../../..
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${GLUT_INCLUDE_DIR}
|
||||
${QT_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
|
||||
set (targetName DecimaterGui)
|
||||
|
||||
# source code directories
|
||||
set (directories
|
||||
../../QtViewer
|
||||
../
|
||||
set (headers
|
||||
../DecimaterViewerWidget.hh
|
||||
../../QtViewer/QGLViewerWidget.hh
|
||||
../../QtViewer/MeshViewerWidgetT.hh
|
||||
../../QtViewer/MeshViewerWidget.hh
|
||||
../../QtViewer/MeshViewerWidgetT_impl.hh
|
||||
)
|
||||
|
||||
# collect all header and source files
|
||||
acg_append_files (headers "*.hh" ${directories})
|
||||
|
||||
set (sources
|
||||
../../QtViewer/QGLViewerWidget.cc
|
||||
../../QtViewer/MeshViewerWidgetT.cc
|
||||
../../QtViewer/MeshViewerWidget.cc
|
||||
../DecimaterViewerWidget.cc
|
||||
../decimaterviewer.cc
|
||||
)
|
||||
|
||||
# remove template cc files from source file list
|
||||
acg_drop_templates (sources)
|
||||
|
||||
# genereate uic and moc targets
|
||||
if(QT5_FOUND)
|
||||
acg_qt5_automoc (moc_targets ${headers})
|
||||
else()
|
||||
acg_qt4_automoc (moc_targets ${headers})
|
||||
endif()
|
||||
|
||||
if (WIN32)
|
||||
acg_add_executable (${targetName} WIN32 ${sources} ${headers} ${moc_targets})
|
||||
# link to qtmain library to get WinMain function for a non terminal app
|
||||
target_link_libraries (${targetName} ${QT_QTMAIN_LIBRARY})
|
||||
acg_add_executable (DecimaterGui WIN32 ${sources} ${headers})
|
||||
else ()
|
||||
acg_add_executable (${targetName} ${sources} ${headers} ${moc_targets})
|
||||
acg_add_executable (DecimaterGui ${sources} ${headers} )
|
||||
endif ()
|
||||
|
||||
target_link_libraries (${targetName}
|
||||
target_link_libraries (DecimaterGui
|
||||
OpenMeshCore
|
||||
OpenMeshTools
|
||||
${QT_LIBRARIES}
|
||||
Qt5::OpenGL
|
||||
${OPENGL_LIBRARIES}
|
||||
${GLUT_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
@@ -1,24 +0,0 @@
|
||||
################################################################################
|
||||
#
|
||||
################################################################################
|
||||
|
||||
include( $$TOPDIR/qmake/all.include )
|
||||
|
||||
Application()
|
||||
|
||||
INCLUDEPATH += ../../..
|
||||
|
||||
Application()
|
||||
glew()
|
||||
glut()
|
||||
openmesh()
|
||||
|
||||
DIRECTORIES = ../../QtViewer ../
|
||||
|
||||
# Input
|
||||
HEADERS += $$getFilesFromDir($$DIRECTORIES,*.hh)
|
||||
SOURCES += ../../QtViewer/QGLViewerWidget.cc ../../QtViewer/MeshViewerWidgetT.cc ../DecimaterViewerWidget.cc
|
||||
SOURCES += ../decimaterviewer.cc
|
||||
|
||||
|
||||
################################################################################
|
||||
@@ -39,12 +39,7 @@
|
||||
* *
|
||||
* ========================================================================= */
|
||||
|
||||
/*===========================================================================*\
|
||||
* *
|
||||
* $Revision$ *
|
||||
* $Date$ *
|
||||
* *
|
||||
\*===========================================================================*/
|
||||
|
||||
|
||||
|
||||
//== INCLUDES =================================================================
|
||||
|
||||
@@ -39,12 +39,7 @@
|
||||
* *
|
||||
* ========================================================================= */
|
||||
|
||||
/*===========================================================================*\
|
||||
* *
|
||||
* $Revision$ *
|
||||
* $Date$ *
|
||||
* *
|
||||
\*===========================================================================*/
|
||||
|
||||
|
||||
|
||||
#ifndef OPENMESHAPPS_DECIMATERVIEWERWIDGET_HH
|
||||
@@ -96,18 +91,18 @@ struct MyTraits : public DEFAULT_TRAITS
|
||||
};
|
||||
|
||||
typedef TRIMESH_KERNEL<MyTraits> mesh_t;
|
||||
typedef MeshViewerWidgetT<mesh_t> MeshViewerWidget;
|
||||
typedef MeshViewerWidgetT<mesh_t> MeshViewerWidgetDecimaterBase;
|
||||
|
||||
//== CLASS DEFINITION =========================================================
|
||||
|
||||
|
||||
class DecimaterViewerWidget : public MeshViewerWidget
|
||||
class DecimaterViewerWidget : public MeshViewerWidgetDecimaterBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
typedef MeshViewerWidget inherited_t;
|
||||
typedef MeshViewerWidgetDecimaterBase inherited_t;
|
||||
|
||||
typedef Decimater::DecimaterT<mesh_t> decimater_t;
|
||||
typedef Decimater::ModQuadricT< mesh_t >::Handle mod_quadric_t;
|
||||
@@ -123,8 +118,8 @@ public:
|
||||
|
||||
|
||||
/// default constructor
|
||||
DecimaterViewerWidget(QWidget* _parent=0)
|
||||
: MeshViewerWidget(_parent),
|
||||
explicit DecimaterViewerWidget(QWidget* _parent=0)
|
||||
: MeshViewerWidgetDecimaterBase(_parent),
|
||||
animate_(false),
|
||||
timer_(0),
|
||||
steps_(1)
|
||||
@@ -149,7 +144,7 @@ public:
|
||||
|
||||
public: // inherited
|
||||
|
||||
bool open_mesh(const char* _filename, OpenMesh::IO::Options _opt)
|
||||
bool open_mesh(const char* _filename, OpenMesh::IO::Options _opt) override
|
||||
{
|
||||
bool rc;
|
||||
|
||||
@@ -175,7 +170,7 @@ protected slots:
|
||||
|
||||
protected:
|
||||
|
||||
virtual void keyPressEvent(QKeyEvent* _event);
|
||||
virtual void keyPressEvent(QKeyEvent* _event) override;
|
||||
|
||||
|
||||
private:
|
||||
|
||||
@@ -5,16 +5,9 @@ include_directories (
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
set (targetName commandlineDecimater)
|
||||
acg_add_executable (commandlineDecimater ../decimater.cc)
|
||||
|
||||
# collect all header and source files
|
||||
set (sources
|
||||
../decimater.cc
|
||||
)
|
||||
|
||||
acg_add_executable (${targetName} ${sources})
|
||||
|
||||
target_link_libraries (${targetName}
|
||||
target_link_libraries (commandlineDecimater
|
||||
OpenMeshCore
|
||||
OpenMeshTools
|
||||
)
|
||||
|
||||
@@ -1,19 +0,0 @@
|
||||
################################################################################
|
||||
#
|
||||
################################################################################
|
||||
|
||||
include( $$TOPDIR/qmake/all.include )
|
||||
|
||||
INCLUDEPATH += ../../..
|
||||
|
||||
Application()
|
||||
glew()
|
||||
glut()
|
||||
openmesh()
|
||||
|
||||
DIRECTORIES = ..
|
||||
|
||||
# Input
|
||||
SOURCES += ../decimater.cc
|
||||
|
||||
################################################################################
|
||||
@@ -39,12 +39,7 @@
|
||||
* *
|
||||
* ========================================================================= */
|
||||
|
||||
/*===========================================================================*\
|
||||
* *
|
||||
* $Revision$ *
|
||||
* $Date$ *
|
||||
* *
|
||||
\*===========================================================================*/
|
||||
|
||||
|
||||
#if !defined(OM_USE_OSG)
|
||||
# define OM_USE_OSG 0
|
||||
@@ -221,7 +216,7 @@ decimate(const std::string &_ifname,
|
||||
using namespace std;
|
||||
|
||||
Mesh mesh;
|
||||
OpenMesh::IO::Options opt;
|
||||
OpenMesh::IO::Options readopt;
|
||||
OpenMesh::Utils::Timer timer;
|
||||
|
||||
// ---------------------------------------- read source mesh
|
||||
@@ -232,7 +227,7 @@ decimate(const std::string &_ifname,
|
||||
|
||||
if (gverbose)
|
||||
clog << _ifname << endl;
|
||||
if ( !(rc = OpenMesh::IO::read_mesh(mesh, _ifname, opt)) )
|
||||
if ( !(rc = OpenMesh::IO::read_mesh(mesh, _ifname, readopt)) )
|
||||
{
|
||||
cerr << " ERROR: read failed!" << endl;
|
||||
return rc;
|
||||
@@ -243,7 +238,7 @@ decimate(const std::string &_ifname,
|
||||
{
|
||||
// ---- 0 - For module NormalFlipping one needs face normals
|
||||
|
||||
if ( !opt.check( OpenMesh::IO::Options::FaceNormal ) )
|
||||
if ( !readopt.check( OpenMesh::IO::Options::FaceNormal ) )
|
||||
{
|
||||
if ( !mesh.has_face_normals() )
|
||||
mesh.request_face_normals();
|
||||
@@ -425,11 +420,11 @@ decimate(const std::string &_ifname,
|
||||
ofname.insert(++pos, n );
|
||||
}
|
||||
|
||||
OpenMesh::IO::Options opt;
|
||||
OpenMesh::IO::Options writeopt;
|
||||
|
||||
//opt += OpenMesh::IO::Options::Binary;
|
||||
|
||||
if ( !OpenMesh::IO::write_mesh(mesh, ofname, opt ) )
|
||||
if ( !OpenMesh::IO::write_mesh(mesh, ofname, writeopt ) )
|
||||
{
|
||||
std::cerr << " Cannot write decimated mesh to file '"
|
||||
<< ofname << "'\n";
|
||||
@@ -464,7 +459,7 @@ int main(int argc, char* argv[])
|
||||
{
|
||||
case 'D': opt.decorate_name = true; break;
|
||||
case 'd': gdebug = true; break;
|
||||
case 'h': usage_and_exit(0);
|
||||
case 'h': usage_and_exit(0); break;
|
||||
case 'i': ifname = optarg; break;
|
||||
case 'M': opt.parse_argument( optarg ); break;
|
||||
case 'n': opt.n_collapses = float(atof(optarg)); break;
|
||||
|
||||
@@ -39,12 +39,7 @@
|
||||
* *
|
||||
* ========================================================================= */
|
||||
|
||||
/*===========================================================================*\
|
||||
* *
|
||||
* $Revision$ *
|
||||
* $Date$ *
|
||||
* *
|
||||
\*===========================================================================*/
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(disable: 4267 4311)
|
||||
@@ -58,12 +53,6 @@
|
||||
|
||||
#include "DecimaterViewerWidget.hh"
|
||||
|
||||
#ifdef ARCH_DARWIN
|
||||
#include <glut.h>
|
||||
#else
|
||||
#include <GL/glut.h>
|
||||
#endif
|
||||
|
||||
void usage_and_exit(int xcode);
|
||||
|
||||
|
||||
@@ -77,13 +66,9 @@ int main(int argc, char **argv)
|
||||
QApplication::setColorSpec( QApplication::CustomColor );
|
||||
QApplication app(argc,argv);
|
||||
|
||||
#if !defined(__APPLE__)
|
||||
glutInit(&argc,argv);
|
||||
#endif
|
||||
|
||||
if ( !QGLFormat::hasOpenGL() ) {
|
||||
QString msg = "System has no OpenGL support!";
|
||||
QMessageBox::critical( NULL, "OpenGL", msg + argv[1] );
|
||||
QMessageBox::critical( nullptr, "OpenGL", msg + argv[1] );
|
||||
return -1;
|
||||
}
|
||||
|
||||
@@ -98,6 +83,7 @@ int main(int argc, char **argv)
|
||||
case 's': opt += OpenMesh::IO::Options::Swap; break;
|
||||
case 'h':
|
||||
usage_and_exit(0);
|
||||
break;
|
||||
default:
|
||||
usage_and_exit(1);
|
||||
}
|
||||
@@ -117,7 +103,7 @@ int main(int argc, char **argv)
|
||||
QString msg = "Cannot read mesh from file:\n '";
|
||||
msg += argv[optind];
|
||||
msg += "'";
|
||||
QMessageBox::critical( NULL, w.windowTitle(), msg );
|
||||
QMessageBox::critical( nullptr, w.windowTitle(), msg );
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
@@ -132,7 +118,7 @@ int main(int argc, char **argv)
|
||||
msg += "- Mesh file didn't provide texture coordinates\n";
|
||||
msg += "- Texture file does not exist\n";
|
||||
msg += "- Texture file is not accessible.\n";
|
||||
QMessageBox::warning( NULL, w.windowTitle(), msg );
|
||||
QMessageBox::warning( nullptr, w.windowTitle(), msg );
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -2,18 +2,11 @@ include (ACGCommon)
|
||||
|
||||
include_directories (
|
||||
../../..
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
|
||||
set (targetName Dualizer)
|
||||
acg_add_executable (Dualizer dualizer.cc)
|
||||
|
||||
# collect all header and source files
|
||||
acg_append_files (headers "*.hh" .)
|
||||
acg_append_files (sources "*.cc" .)
|
||||
|
||||
acg_add_executable (${targetName} ${headers} ${sources})
|
||||
|
||||
target_link_libraries (${targetName}
|
||||
target_link_libraries (Dualizer
|
||||
OpenMeshCore
|
||||
OpenMeshTools
|
||||
)
|
||||
|
||||
@@ -39,12 +39,7 @@
|
||||
* *
|
||||
* ========================================================================= */
|
||||
|
||||
/*===========================================================================*\
|
||||
* *
|
||||
* $Revision$ *
|
||||
* $Date$ *
|
||||
* *
|
||||
\*===========================================================================*/
|
||||
|
||||
|
||||
#include <iostream>
|
||||
|
||||
|
||||
@@ -3,62 +3,32 @@ include (ACGCommon)
|
||||
include_directories (
|
||||
../../..
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${GLUT_INCLUDE_DIR}
|
||||
${QT_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set (targetName ProgViewer)
|
||||
|
||||
set( headers
|
||||
ProgViewerWidget.hh
|
||||
../QtViewer/QGLViewerWidget.hh
|
||||
../QtViewer/MeshViewerWidgetT.hh
|
||||
../QtViewer/MeshViewerWidgetT_impl.hh
|
||||
)
|
||||
|
||||
# collect all header and source files
|
||||
acg_append_files (headers "*.hh" .)
|
||||
acg_append_files (sources "*.cc" .)
|
||||
|
||||
list (APPEND sources "../QtViewer/QGLViewerWidget.cc")
|
||||
list (APPEND sources "../QtViewer/MeshViewerWidgetT.cc")
|
||||
|
||||
list (APPEND headers "../QtViewer/QGLViewerWidget.hh")
|
||||
list (APPEND headers "../QtViewer/MeshViewerWidgetT.hh")
|
||||
|
||||
|
||||
# # source code directories
|
||||
# set (directories
|
||||
# .
|
||||
# ../QtViewer
|
||||
# )
|
||||
|
||||
# # collect all header and source files
|
||||
# acg_append_files (headers "*.hh" ${directories})
|
||||
|
||||
# set (sources
|
||||
# ../../QtViewer/QGLViewerWidget.cc
|
||||
# ../../QtViewer/MeshViewerWidgetT.cc
|
||||
# ./ProgViewerWidget.cc
|
||||
# )
|
||||
|
||||
# remove template cc files from source file list
|
||||
acg_drop_templates (sources)
|
||||
|
||||
# genereate uic and moc targets
|
||||
if(QT5_FOUND)
|
||||
acg_qt5_automoc (moc_targets ${headers})
|
||||
else()
|
||||
acg_qt4_automoc (moc_targets ${headers})
|
||||
endif()
|
||||
set( sources
|
||||
ProgViewerWidget.cc
|
||||
progviewer.cc
|
||||
../QtViewer/QGLViewerWidget.cc
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
acg_add_executable (${targetName} WIN32 ${sources} ${headers} ${moc_targets})
|
||||
# link to qtmain library to get WinMain function for a non terminal app
|
||||
target_link_libraries (${targetName} ${QT_QTMAIN_LIBRARY})
|
||||
acg_add_executable( ProgViewer WIN32 ${sources} ${headers})
|
||||
else ()
|
||||
acg_add_executable (${targetName} ${sources} ${headers} ${moc_targets})
|
||||
acg_add_executable( ProgViewer ${sources} ${headers})
|
||||
endif ()
|
||||
|
||||
target_link_libraries (${targetName}
|
||||
target_link_libraries ( ProgViewer
|
||||
OpenMeshCore
|
||||
OpenMeshTools
|
||||
${QT_LIBRARIES}
|
||||
Qt5::OpenGL
|
||||
${OPENGL_LIBRARIES}
|
||||
${GLUT_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
@@ -1,274 +0,0 @@
|
||||
<?xml version="1.0" encoding="Windows-1252"?>
|
||||
<VisualStudioProject
|
||||
ProjectType="Visual C++"
|
||||
Version="9,00"
|
||||
Name="OpenMesh_Apps_ProgViewer"
|
||||
ProjectGUID="{6CC92D44-A0AC-47D0-9482-D983B1F27E63}"
|
||||
Keyword="Win32Proj"
|
||||
TargetFrameworkVersion="131072"
|
||||
>
|
||||
<Platforms>
|
||||
<Platform
|
||||
Name="Win32"
|
||||
/>
|
||||
</Platforms>
|
||||
<ToolFiles>
|
||||
</ToolFiles>
|
||||
<Configurations>
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="Debug"
|
||||
IntermediateDirectory="Debug"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories="c:\glut\include;C:\glew\include;..\..\..;"$(QTDIR)/include";"$(QTDIR)/include/QtCore";"$(QTDIR)/inlcude/Qt";"$(QTDIR)/include/QtGUI";"$(QTDIR)/include/QtOpenGL""
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_CONSOLE;_USE_MATH_DEFINES;QT_DLL"
|
||||
MinimalRebuild="false"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
DisableLanguageExtensions="false"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
ProgramDataBaseFileName="$(IntDir)/vc70.pdb"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="4"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="QtCore4.lib QtGUI4.lib QtOpenGL4.lib opengl32.lib"
|
||||
OutputFile="..\..\bin\progviewer_dbg.exe"
|
||||
LinkIncremental="2"
|
||||
AdditionalLibraryDirectories="$(QTDIR)/lib;C:\glut\lib;C:\glew\lib"
|
||||
GenerateDebugInformation="true"
|
||||
ProgramDatabaseFile="$(OutDir)\$(TargetName).pdb"
|
||||
SubSystem="1"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="Release"
|
||||
IntermediateDirectory="Release"
|
||||
ConfigurationType="1"
|
||||
InheritedPropertySheets="$(VCInstallDir)VCProjectDefaults\UpgradeFromVC71.vsprops"
|
||||
CharacterSet="2"
|
||||
>
|
||||
<Tool
|
||||
Name="VCPreBuildEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXMLDataGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCWebServiceProxyGeneratorTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCMIDLTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCCLCompilerTool"
|
||||
AdditionalIncludeDirectories="c:\glut\include;C:\glew\include;..\..\..;"$(QTDIR)/include";"$(QTDIR)/include/QtCore";"$(QTDIR)/inlcude/Qt";"$(QTDIR)/include/QtGUI";"$(QTDIR)/include/QtOpenGL""
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_CONSOLE;_USE_MATH_DEFINES;QT_DLL"
|
||||
RuntimeLibrary="2"
|
||||
DisableLanguageExtensions="false"
|
||||
ForceConformanceInForLoopScope="true"
|
||||
RuntimeTypeInfo="true"
|
||||
UsePrecompiledHeader="0"
|
||||
WarningLevel="3"
|
||||
Detect64BitPortabilityProblems="false"
|
||||
DebugInformationFormat="3"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManagedResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCResourceCompilerTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPreLinkEventTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="QtCore4.lib QtGUI4.lib QtOpenGL4.lib opengl32.lib"
|
||||
OutputFile="..\..\bin\progviewer.exe"
|
||||
LinkIncremental="1"
|
||||
AdditionalLibraryDirectories="$(QTDIR)/lib;C:\glut\lib;C:\glew\lib"
|
||||
GenerateDebugInformation="true"
|
||||
SubSystem="1"
|
||||
OptimizeReferences="2"
|
||||
EnableCOMDATFolding="2"
|
||||
RandomizedBaseAddress="1"
|
||||
DataExecutionPrevention="0"
|
||||
TargetMachine="1"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCALinkTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCManifestTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCXDCMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCBscMakeTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCFxCopTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCAppVerifierTool"
|
||||
/>
|
||||
<Tool
|
||||
Name="VCPostBuildEventTool"
|
||||
/>
|
||||
</Configuration>
|
||||
</Configurations>
|
||||
<References>
|
||||
</References>
|
||||
<Files>
|
||||
<Filter
|
||||
Name="Generated Files"
|
||||
>
|
||||
<File
|
||||
RelativePath=".\moc_ProgViewerWidget.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\moc_QGLViewerWidget.cpp"
|
||||
>
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath="..\QtViewer\MeshViewerWidgetT.cc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\QtViewer\QGLViewerWidget.cc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\QtViewer\MeshViewerWidgetT.hh"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\progviewer.cc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ProgViewerWidget.cc"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\ProgViewerWidget.hh"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="MOC $(InputFileName)"
|
||||
CommandLine="$(QTDIR)\bin\moc.exe $(InputFileName) -o moc_$(InputName).cpp
"
|
||||
Outputs="moc_$(InputName).cpp"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="MOC $(InputFileName)"
|
||||
CommandLine="$(QTDIR)\bin\moc.exe $(InputFileName) -o moc_$(InputName).cpp
"
|
||||
Outputs="moc_$(InputName).cpp"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\QtViewer\QGLViewerWidget.hh"
|
||||
>
|
||||
<FileConfiguration
|
||||
Name="Debug|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="MOC $(InputFileName)"
|
||||
CommandLine="$(QTDIR)\bin\moc.exe ..\QtViewer\$(InputFileName) -o moc_$(InputName).cpp
"
|
||||
Outputs="moc_$(InputName).cpp"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
<FileConfiguration
|
||||
Name="Release|Win32"
|
||||
>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"
|
||||
Description="MOC $(InputFileName)"
|
||||
CommandLine="$(QTDIR)\bin\moc.exe ..\QtViewer\$(InputFileName) -o moc_$(InputName).cpp
"
|
||||
Outputs="moc_$(InputName).cpp"
|
||||
/>
|
||||
</FileConfiguration>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\test1.cpp"
|
||||
>
|
||||
</File>
|
||||
</Files>
|
||||
<Globals>
|
||||
</Globals>
|
||||
</VisualStudioProject>
|
||||
@@ -39,12 +39,7 @@
|
||||
* *
|
||||
* ========================================================================= */
|
||||
|
||||
/*===========================================================================*\
|
||||
* *
|
||||
* $Revision$ *
|
||||
* $Date$ *
|
||||
* *
|
||||
\*===========================================================================*/
|
||||
|
||||
|
||||
|
||||
//== INCLUDES =================================================================
|
||||
|
||||
@@ -39,12 +39,7 @@
|
||||
* *
|
||||
* ========================================================================= */
|
||||
|
||||
/*===========================================================================*\
|
||||
* *
|
||||
* $Revision$ *
|
||||
* $Date$ *
|
||||
* *
|
||||
\*===========================================================================*/
|
||||
|
||||
|
||||
|
||||
#ifndef OPENMESHAPPS_PROGVIEWERWIDGET_HH
|
||||
@@ -68,7 +63,7 @@ using namespace OpenMesh;
|
||||
using namespace OpenMesh::Attributes;
|
||||
|
||||
|
||||
struct MyTraits : public OpenMesh::DefaultTraits
|
||||
struct ProgTraits : public OpenMesh::DefaultTraits
|
||||
{
|
||||
VertexAttributes ( OpenMesh::Attributes::Normal |
|
||||
OpenMesh::Attributes::Status );
|
||||
@@ -79,28 +74,32 @@ struct MyTraits : public OpenMesh::DefaultTraits
|
||||
};
|
||||
|
||||
|
||||
typedef OpenMesh::TriMesh_ArrayKernelT<MyTraits> MyMesh;
|
||||
typedef MeshViewerWidgetT<MyMesh> MeshViewerWidget;
|
||||
typedef OpenMesh::TriMesh_ArrayKernelT<ProgTraits> MyMesh;
|
||||
typedef MeshViewerWidgetT<MyMesh> MeshViewerWidgetProgBase;
|
||||
|
||||
|
||||
//== CLASS DEFINITION =========================================================
|
||||
|
||||
|
||||
|
||||
class ProgViewerWidget : public MeshViewerWidget
|
||||
class ProgViewerWidget : public MeshViewerWidgetProgBase
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
typedef MeshViewerWidget Base;
|
||||
typedef MeshViewerWidgetProgBase Base;
|
||||
typedef ProgViewerWidget This;
|
||||
|
||||
|
||||
public:
|
||||
/// default constructor
|
||||
ProgViewerWidget(QWidget* _parent=0)
|
||||
: MeshViewerWidget(_parent)
|
||||
explicit ProgViewerWidget(QWidget* _parent=0)
|
||||
: MeshViewerWidgetProgBase(_parent),
|
||||
n_base_vertices_(0),
|
||||
n_base_faces_(0),
|
||||
n_detail_vertices_(0),
|
||||
n_max_vertices_(0)
|
||||
{
|
||||
timer_ = new QTimer(this);
|
||||
|
||||
@@ -138,7 +137,7 @@ private:
|
||||
/// coarsen mesh down to _n vertices
|
||||
void coarsen(unsigned int _n);
|
||||
|
||||
virtual void keyPressEvent(QKeyEvent* _event);
|
||||
virtual void keyPressEvent(QKeyEvent* _event) override;
|
||||
|
||||
// mesh data
|
||||
bool animateRefinement_;
|
||||
|
||||
@@ -39,12 +39,7 @@
|
||||
* *
|
||||
* ========================================================================= */
|
||||
|
||||
/*===========================================================================*\
|
||||
* *
|
||||
* $Revision$ *
|
||||
* $Date$ *
|
||||
* *
|
||||
\*===========================================================================*/
|
||||
|
||||
|
||||
#ifdef _MSC_VER
|
||||
# pragma warning(disable: 4267 4311)
|
||||
@@ -58,11 +53,6 @@
|
||||
#include <QApplication>
|
||||
#include <QGLWidget>
|
||||
|
||||
#ifdef ARCH_DARWIN
|
||||
#include <glut.h>
|
||||
#else
|
||||
#include <GL/glut.h>
|
||||
#endif
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
@@ -70,8 +60,6 @@ int main(int argc, char **argv)
|
||||
QApplication::setColorSpec( QApplication::CustomColor );
|
||||
QApplication app(argc,argv);
|
||||
|
||||
glutInit(&argc,argv);
|
||||
|
||||
if ( !QGLFormat::hasOpenGL() ) {
|
||||
std::cerr << "This system has no OpenGL support.\n";
|
||||
return -1;
|
||||
|
||||
@@ -3,48 +3,34 @@ include (ACGCommon)
|
||||
include_directories (
|
||||
../../..
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${GLUT_INCLUDE_DIR}
|
||||
${QT_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
set (targetName QtViewer)
|
||||
|
||||
# source code directories
|
||||
set (directories
|
||||
.
|
||||
)
|
||||
|
||||
# collect all header and source files
|
||||
acg_append_files (headers "*.hh" ${directories})
|
||||
acg_append_files (sources "*.cc" ${directories})
|
||||
acg_append_files (ui "*.ui" ${directories})
|
||||
|
||||
# remove template cc files from source file list
|
||||
acg_drop_templates (sources)
|
||||
|
||||
# genereate uic and moc targets
|
||||
if(QT5_FOUND)
|
||||
acg_qt5_autouic (uic_targets ${ui})
|
||||
acg_qt5_automoc (moc_targets ${headers})
|
||||
else()
|
||||
acg_qt4_autouic (uic_targets ${ui})
|
||||
acg_qt4_automoc (moc_targets ${headers})
|
||||
endif()
|
||||
|
||||
|
||||
if (WIN32)
|
||||
acg_add_executable (${targetName} WIN32 ${uic_targets} ${sources} ${headers} ${moc_targets})
|
||||
# link to qtmain library to get WinMain function for a non terminal app
|
||||
target_link_libraries (${targetName} ${QT_QTMAIN_LIBRARY})
|
||||
else ()
|
||||
acg_add_executable (${targetName} ${uic_targets} ${sources} ${headers} ${moc_targets})
|
||||
endif ()
|
||||
|
||||
target_link_libraries (${targetName}
|
||||
OpenMeshCore
|
||||
OpenMeshTools
|
||||
${QT_LIBRARIES}
|
||||
${OPENGL_LIBRARIES}
|
||||
${GLUT_LIBRARIES}
|
||||
set (sources
|
||||
MeshViewerWidget.cc
|
||||
QGLViewerWidget.cc
|
||||
meshviewer.cc
|
||||
)
|
||||
|
||||
set (headers
|
||||
MeshViewerWidget.hh
|
||||
QGLViewerWidget.hh
|
||||
)
|
||||
|
||||
if (WIN32)
|
||||
acg_add_executable (QtViewer WIN32 ${sources} ${headers})
|
||||
else ()
|
||||
acg_add_executable (QtViewer ${sources} ${headers})
|
||||
endif ()
|
||||
|
||||
target_link_libraries (QtViewer
|
||||
OpenMeshCore
|
||||
OpenMeshTools
|
||||
Qt5::OpenGL
|
||||
${OPENGL_LIBRARIES}
|
||||
)
|
||||
|
||||
|
||||
114
src/OpenMesh/Apps/QtViewer/MeshViewerWidget.cc
Normal file
114
src/OpenMesh/Apps/QtViewer/MeshViewerWidget.cc
Normal file
@@ -0,0 +1,114 @@
|
||||
/* ========================================================================= *
|
||||
* *
|
||||
* OpenMesh *
|
||||
* Copyright (c) 2001-2015, RWTH-Aachen University *
|
||||
* Department of Computer Graphics and Multimedia *
|
||||
* All rights reserved. *
|
||||
* www.openmesh.org *
|
||||
* *
|
||||
*---------------------------------------------------------------------------*
|
||||
* This file is part of OpenMesh. *
|
||||
*---------------------------------------------------------------------------*
|
||||
* *
|
||||
* Redistribution and use in source and binary forms, with or without *
|
||||
* modification, are permitted provided that the following conditions *
|
||||
* are met: *
|
||||
* *
|
||||
* 1. Redistributions of source code must retain the above copyright notice, *
|
||||
* this list of conditions and the following disclaimer. *
|
||||
* *
|
||||
* 2. Redistributions in binary form must reproduce the above copyright *
|
||||
* notice, this list of conditions and the following disclaimer in the *
|
||||
* documentation and/or other materials provided with the distribution. *
|
||||
* *
|
||||
* 3. Neither the name of the copyright holder nor the names of its *
|
||||
* contributors may be used to endorse or promote products derived from *
|
||||
* this software without specific prior written permission. *
|
||||
* *
|
||||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS *
|
||||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED *
|
||||
* TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A *
|
||||
* PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER *
|
||||
* OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, *
|
||||
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, *
|
||||
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR *
|
||||
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF *
|
||||
* LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING *
|
||||
* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS *
|
||||
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. *
|
||||
* *
|
||||
* ========================================================================= */
|
||||
|
||||
|
||||
|
||||
#define OPENMESHAPPS_MESHVIEWERWIDGET_CC
|
||||
|
||||
//== INCLUDES =================================================================
|
||||
|
||||
#include <OpenMesh/Apps/QtViewer/MeshViewerWidget.hh>
|
||||
|
||||
|
||||
//== IMPLEMENTATION ==========================================================
|
||||
|
||||
/// default constructor
|
||||
MeshViewerWidget::MeshViewerWidget(QWidget* parent) : MeshViewerWidgetT<MyMesh>(parent)
|
||||
{}
|
||||
|
||||
void MeshViewerWidget::open_mesh_gui(QString fname)
|
||||
{
|
||||
OpenMesh::Utils::Timer t;
|
||||
t.start();
|
||||
if ( fname.isEmpty() || !open_mesh(fname.toLocal8Bit(), _options) )
|
||||
{
|
||||
QString msg = "Cannot read mesh from file:\n '";
|
||||
msg += fname;
|
||||
msg += "'";
|
||||
QMessageBox::critical( nullptr, windowTitle(), msg);
|
||||
}
|
||||
t.stop();
|
||||
std::cout << "Loaded mesh in ~" << t.as_string() << std::endl;
|
||||
|
||||
}
|
||||
|
||||
void MeshViewerWidget::open_texture_gui(QString fname)
|
||||
{
|
||||
if ( fname.isEmpty() || !open_texture( fname.toLocal8Bit() ) )
|
||||
{
|
||||
QString msg = "Cannot load texture image from file:\n '";
|
||||
msg += fname;
|
||||
msg += "'\n\nPossible reasons:\n";
|
||||
msg += "- Mesh file didn't provide texture coordinates\n";
|
||||
msg += "- Texture file does not exist\n";
|
||||
msg += "- Texture file is not accessible.\n";
|
||||
QMessageBox::warning( nullptr, windowTitle(), msg );
|
||||
}
|
||||
}
|
||||
|
||||
void MeshViewerWidget::query_open_mesh_file() {
|
||||
QString fileName = QFileDialog::getOpenFileName(this,
|
||||
tr("Open mesh file"),
|
||||
tr(""),
|
||||
tr("OBJ Files (*.obj);;"
|
||||
"OFF Files (*.off);;"
|
||||
"STL Files (*.stl);;"
|
||||
"All Files (*)"));
|
||||
if (!fileName.isEmpty())
|
||||
open_mesh_gui(fileName);
|
||||
}
|
||||
|
||||
void MeshViewerWidget::query_open_texture_file() {
|
||||
QString fileName = QFileDialog::getOpenFileName(this,
|
||||
tr("Open texture file"),
|
||||
tr(""),
|
||||
tr("PNG Files (*.png);;"
|
||||
"BMP Files (*.bmp);;"
|
||||
"GIF Files (*.gif);;"
|
||||
"JPEG Files (*.jpg);;"
|
||||
"TIFF Files (*.tif);;"
|
||||
"All Files (*)"));
|
||||
if (!fileName.isEmpty())
|
||||
open_texture_gui(fileName);
|
||||
}
|
||||
|
||||
//=============================================================================
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user