From 8b97b62e0d5cc27460ba1496470a6f6162f63e27 Mon Sep 17 00:00:00 2001 From: alemuntoni Date: Mon, 27 Jan 2020 18:16:12 +0100 Subject: [PATCH] VCGLib is now a submodule. --- .github/workflows/CompileAndDeploy.yml | 26 ++++++++++++++++++-------- .github/workflows/CompileMacOS.yml | 8 ++++++-- .github/workflows/CompileUbuntu.yml | 16 ++++++++++++---- .github/workflows/CompileWindows.yml | 20 ++++++++++++-------- .gitmodules | 3 +++ src/CMakeLists.txt | 2 +- src/general.pri | 2 +- src/meshlabplugins/io_base/io_base.pro | 6 +++--- src/shared.pri | 5 +---- vcglib | 1 + 10 files changed, 58 insertions(+), 31 deletions(-) create mode 100644 .gitmodules create mode 160000 vcglib diff --git a/.github/workflows/CompileAndDeploy.yml b/.github/workflows/CompileAndDeploy.yml index 5522de29b..9b66d0655 100755 --- a/.github/workflows/CompileAndDeploy.yml +++ b/.github/workflows/CompileAndDeploy.yml @@ -12,11 +12,15 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Checkout submodules + shell: bash + run: | + auth_header="$(git config --local --get http.https://github.com/.extraheader)" + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: Installing dependencies run: | sudo apt install -y qt5-default qttools5-dev-tools qtscript5-dev libqt5xmlpatterns5-dev mesa-common-dev libglu1-mesa-dev lib3ds-dev libglew-dev libeigen3-dev libopenctm-dev libgmp-dev libqhull-dev - cd .. - git clone --depth=1 --branch=devel https://github.com/cnr-isti-vclab/vcglib.git - name: Setting env variables id: envs shell: bash @@ -50,12 +54,16 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Checkout submodules + shell: bash + run: | + auth_header="$(git config --local --get http.https://github.com/.extraheader)" + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: Installing dependencies run: | brew install llvm libomp qt npm install -g appdmg - cd .. - git clone --depth=1 --branch=devel https://github.com/cnr-isti-vclab/vcglib.git - name: Setting env variables id: envs shell: bash @@ -89,16 +97,18 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Checkout submodules + shell: bash + run: | + auth_header="$(git config --local --get http.https://github.com/.extraheader)" + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: Setting MSVC uses: ilammy/msvc-dev-cmd@v1 - name: Installing QT uses: jurplel/install-qt-action@v2 with: modules: qtscript xmlpatterns - - name: Installing dependencies - run: | - cd .. - git clone --depth=1 --branch=devel https://github.com/cnr-isti-vclab/vcglib.git - name: Compiling MeshLab run: | cd src\ diff --git a/.github/workflows/CompileMacOS.yml b/.github/workflows/CompileMacOS.yml index eed6acbf3..b66f7cbe3 100755 --- a/.github/workflows/CompileMacOS.yml +++ b/.github/workflows/CompileMacOS.yml @@ -10,12 +10,16 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Checkout submodules + shell: bash + run: | + auth_header="$(git config --local --get http.https://github.com/.extraheader)" + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: Installing dependencies run: | brew install llvm libomp qt npm install -g appdmg - cd .. - git clone --depth=1 --branch=devel https://github.com/cnr-isti-vclab/vcglib.git - name: Setting env variables id: envs shell: bash diff --git a/.github/workflows/CompileUbuntu.yml b/.github/workflows/CompileUbuntu.yml index 210dc2891..ce0e4536e 100755 --- a/.github/workflows/CompileUbuntu.yml +++ b/.github/workflows/CompileUbuntu.yml @@ -10,11 +10,15 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Checkout submodules + shell: bash + run: | + auth_header="$(git config --local --get http.https://github.com/.extraheader)" + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: Installing dependencies run: | sudo apt install -y qt5-default qttools5-dev-tools qtscript5-dev libqt5xmlpatterns5-dev mesa-common-dev libglu1-mesa-dev lib3ds-dev libglew-dev libeigen3-dev libopenctm-dev libgmp-dev libqhull-dev - cd .. - git clone --depth=1 --branch=devel https://github.com/cnr-isti-vclab/vcglib.git - name: Setting env variables id: envs shell: bash @@ -49,12 +53,16 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Checkout submodules + shell: bash + run: | + auth_header="$(git config --local --get http.https://github.com/.extraheader)" + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: Installing dependencies run: | sudo apt update sudo apt install -y qt5-default qtscript5-dev libqt5xmlpatterns5-dev mesa-common-dev libglu1-mesa-dev lib3ds-dev libglew-dev libeigen3-dev libopenctm-dev libgmp-dev libqhull-dev cmake ninja-build - cd .. - git clone --depth=1 --branch=devel https://github.com/cnr-isti-vclab/vcglib.git - name: Configuring run: | cmake src/ -G Ninja diff --git a/.github/workflows/CompileWindows.yml b/.github/workflows/CompileWindows.yml index d5860a89a..dcbb44bab 100644 --- a/.github/workflows/CompileWindows.yml +++ b/.github/workflows/CompileWindows.yml @@ -9,16 +9,18 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Checkout submodules + shell: bash + run: | + auth_header="$(git config --local --get http.https://github.com/.extraheader)" + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: Setting MSVC uses: ilammy/msvc-dev-cmd@v1 - name: Installing QT uses: jurplel/install-qt-action@v2 with: modules: qtscript xmlpatterns - - name: Installing dependencies - run: | - cd .. - git clone --depth=1 --branch=devel https://github.com/cnr-isti-vclab/vcglib.git - name: Compiling MeshLab run: | cd src\ @@ -40,16 +42,18 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Checkout submodules + shell: bash + run: | + auth_header="$(git config --local --get http.https://github.com/.extraheader)" + git submodule sync --recursive + git -c "http.extraheader=$auth_header" -c protocol.version=2 submodule update --init --force --recursive --depth=1 - name: Setting MSVC uses: ilammy/msvc-dev-cmd@v1 - name: Installing QT uses: jurplel/install-qt-action@v2 with: modules: qtscript xmlpatterns - - name: Installing dependencies - run: | - cd .. - git clone --depth=1 --branch=devel https://github.com/cnr-isti-vclab/vcglib.git - name: Configure run: | cmake -S ./src -B ./build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_INSTALL_PREFIX=install diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 000000000..98400abdb --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "vcglib"] + path = vcglib + url = https://github.com/cnr-isti-vclab/vcglib diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index d5fe81288..3176d1b30 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -11,7 +11,7 @@ endif() ### vcglib if(NOT VCGDIR) - get_filename_component(VCGDIR "${CMAKE_CURRENT_SOURCE_DIR}/../../vcglib" ABSOLUTE) + get_filename_component(VCGDIR "${CMAKE_CURRENT_SOURCE_DIR}/../vcglib" ABSOLUTE) if(NOT EXISTS ${VCGDIR}) set(VCGDIR NOTFOUND) endif() diff --git a/src/general.pri b/src/general.pri index a2e65fccd..5369a8391 100644 --- a/src/general.pri +++ b/src/general.pri @@ -9,7 +9,7 @@ DEFINES += MESHLAB_SCALAR=float # VCG directory -VCGDIR = ../../../vcglib +VCGDIR = $$MESHLAB_SOURCE_DIRECTORY/../vcglib # MeshLab requires C++11 CONFIG += c++11 diff --git a/src/meshlabplugins/io_base/io_base.pro b/src/meshlabplugins/io_base/io_base.pro index 097492e6f..86f72f4ec 100644 --- a/src/meshlabplugins/io_base/io_base.pro +++ b/src/meshlabplugins/io_base/io_base.pro @@ -16,8 +16,8 @@ HEADERS += \ SOURCES += \ baseio.cpp \ - $$VCGDIR//wrap/ply/plylib.cpp\ - $$VCGDIR//wrap/openfbx/src/ofbx.cpp \ - $$VCGDIR//wrap/openfbx/src/miniz.c + $$VCGDIR/wrap/ply/plylib.cpp \ + $$VCGDIR/wrap/openfbx/src/ofbx.cpp \ + $$VCGDIR/wrap/openfbx/src/miniz.c TARGET = io_base diff --git a/src/shared.pri b/src/shared.pri index 7232b003a..d525ceb67 100644 --- a/src/shared.pri +++ b/src/shared.pri @@ -1,9 +1,6 @@ # This is the common include for all the plugins include (general.pri) -VCGDIR = ../$$VCGDIR -# only adjust relative path if we're not using system Eigen -!CONFIG(system_eigen3):EIGENDIR = ../$$EIGENDIR TEMPLATE = lib CONFIG += plugin @@ -19,7 +16,7 @@ linux-g++:LIBS += -lcommon -lGL -lGLU win32-msvc:DEFINES += GLEW_STATIC _USE_MATH_DEFINES -INCLUDEPATH *= ../.. $$VCGDIR $$EIGENDIR +INCLUDEPATH *= ../.. $$VCGDIR $$EIGENDIR !CONFIG(system_glew): INCLUDEPATH *= $$GLEWDIR/include DEPENDPATH += ../.. $$VCGDIR diff --git a/vcglib b/vcglib new file mode 160000 index 000000000..cfe695ece --- /dev/null +++ b/vcglib @@ -0,0 +1 @@ +Subproject commit cfe695ece30698c59e8676b9ce5250584f4adace