Merge pull request #849 from alemuntoni/external_libs_cmake_option

external is a subdirectory
This commit is contained in:
Alessandro Muntoni 2020-12-04 09:08:38 +01:00 committed by GitHub
commit b3df3660e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 26 deletions

View File

@ -26,6 +26,9 @@ find_package(
COMPONENTS OpenGL Xml Network
REQUIRED)
find_package(OpenMP)
if (NOT BUILD_MINI)
find_package(Qt5Qml)
endif()
message(STATUS "Searching for required components with bundled fallback")
find_package(GLEW)
@ -103,14 +106,24 @@ endif()
### Enter subdirectories
# VCGLib -- required
if(NOT VCGDIR)
get_filename_component(VCGDIR "${CMAKE_CURRENT_LIST_DIR}/vcglib" ABSOLUTE)
if(NOT EXISTS ${VCGDIR})
set(VCGDIR NOTFOUND)
endif()
endif()
set(VCGDIR "${VCGDIR}")
if(NOT VCGDIR)
message(FATAL_ERROR "VCGLib not found. Please clone recursively the MeshLab repo.")
endif()
# External
set(EXTERNAL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/external)
include(${CMAKE_CURRENT_SOURCE_DIR}/external_common.cmake)
if(NOT BUILD_MINI)
message(STATUS "Searching for optional components")
find_package(Qt5Qml)
include(${EXTERNAL_DIR}/external.cmake)
endif()
include(${EXTERNAL_DIR}/external_common.cmake)
add_subdirectory(${EXTERNAL_DIR})
# Start automoc/autouic/autorcc
set(CMAKE_AUTOMOC ON)

11
src/external/CMakeLists.txt vendored Normal file
View File

@ -0,0 +1,11 @@
# Copyright 2019, 2020, Collabora, Ltd.
# Copyright 2019, 2020, Visual Computing Lab, ISTI - Italian National Research Council
# SPDX-License-Identifier: BSL-1.0
# GLEW - required
include(${EXTERNAL_DIR}/glew.cmake)
if(NOT BUILD_MINI)
message(STATUS "Searching for optional components")
include(${EXTERNAL_DIR}/external.cmake)
endif()

View File

@ -12,23 +12,5 @@ if(BUILD_BUNDLED_SOURCES_WITHOUT_WARNINGS)
endif()
endif()
# GLEW - required
include(${EXTERNAL_DIR}/glew.cmake)
# VCGLib -- required
if(NOT VCGDIR)
get_filename_component(VCGDIR "${CMAKE_CURRENT_LIST_DIR}/vcglib" ABSOLUTE)
if(NOT EXISTS ${VCGDIR})
set(VCGDIR NOTFOUND)
endif()
endif()
set(VCGDIR "${VCGDIR}")
if(NOT VCGDIR)
message(FATAL_ERROR "VCGLib not found. Please clone recursively the MeshLab repo.")
endif()
# Eigen3 - required
include(${EXTERNAL_DIR}/eigen.cmake)

View File

@ -8,7 +8,7 @@ if(TARGET external-IDTFConverter)
set(SOURCES io_u3d.cpp)
set(HEADERS io_u3d.h)
include_directories("${U3D_DIR}/src/IDTF")
include_directories("${EXTERNAL_DIR}/u3d/src/IDTF")
add_library(io_u3d MODULE ${SOURCES} ${HEADERS})

View File

@ -81,7 +81,7 @@ bool U3DIOPlugin::save(
const int mask,
const RichParameterList & par,
vcg::CallBackPos *,
QWidget *parent)
QWidget *)
{
vcg::tri::Allocator<CMeshO>::CompactVertexVector(m.cm);
vcg::tri::Allocator<CMeshO>::CompactFaceVector(m.cm);