https://gitlab.liris.cnrs.fr/gdamiand/generic-query-modify
Tip revision: 69edcd4963d23dcc3e17de17c68ec456e12f1f42 authored by Guillaume Damiand on 21 July 2025, 07:58:39 UTC
script
script
Tip revision: 69edcd4
CMakeLists.txt
cmake_minimum_required(VERSION 3.5)
project(Generic_query_modify)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTORCC ON)
################################################################################
add_definitions("-Wall -Wextra")
set(CMAKE_CXX_STANDARD 20)
add_definitions("-DDATA_DIR=\"${CMAKE_SOURCE_DIR}/data/\"")
add_compile_definitions(QT_NO_KEYWORDS)
option(REFACTOR "use dart check refactor" ON)
if(REFACTOR)
add_definitions("-DREFACTOR_VINCENT") # To use the new code by Vincent for signature
endif()
option(USE_HXT "use HXT to compute Jacobian" ON)
if(REFACTOR)
add_definitions("-DUSE_HXT")
endif()
# Default to Release
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: Debug Release RelWithDebInfo MinSizeRel." FORCE)
set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS "Debug" "Release" "MinSizeRel" "RelWithDebInfo")
endif (NOT CMAKE_BUILD_TYPE)
################################################################################
find_package(CGAL REQUIRED COMPONENTS Qt6 REQUIRED)
find_package(Qt6 REQUIRED COMPONENTS Widgets OpenGL Svg REQUIRED)
find_package(Eigen3 REQUIRED)
include(CGAL_Eigen3_support)
################################################################################
include_directories(
src
src/input_output/
src/query_replace/
)
include_directories(BEFORE SYSTEM src/LOCAL_CGAL/) # Local version of Barycentric coord 3 package
include_directories(BEFORE SYSTEM ${CMAKE_SOURCE_DIR})
################################################################################
find_package(OpenMP)
if (OPENMP_FOUND)
set (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${OpenMP_C_FLAGS}")
set (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${OpenMP_CXX_FLAGS}")
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} ${OpenMP_EXE_LINKER_FLAGS}")
endif()
################################################################################
if (USE_HXT)
add_definitions("-DUSE_HXT")
include_directories(SYSTEM external_libs/hxt/ external_libs/hxt/mwis
external_libs/hxt/nauty external_libs/hxt/search)
add_subdirectory(external_libs/hxt/)
endif()
################################################################################
set(src_tools
src/cmap_3close_cc.h
src/cmap_copy.h
src/cmap_isomorphisms.h
src/cmap_shuffle.h
# src/cmap_split_merge.h
# src/Compact_container_same_sizes.h
src/Compute_stats.h
src/diamond_square.h
# src/draw_polygon_soup.h
src/Element_topo.h
src/Generic_cell_iterators.h
# src/hexahedral_mesh_is_regular.h
# src/Hexahedral_subdivision.h
# src/Hexahedral_tools.h
src/lcc_barycentric_coord.h
# src/lcc_compute_kernel.h
# src/lcc_convexity_test.h
# src/lcc_creations.h
# src/lcc_fictive_edges.h
src/lcc_geometrical_tests.h
# src/lcc_geometry_transformation.h
# src/lcc_homogenize.h
src/lcc_jacobian.h
# src/lcc_pqq_subdivision.h
# src/lcc_project_on_surface.h
# src/lcc_remove_faces.h
# src/lcc_remove_cc.h
# src/lcc_remove_volumes.h
src/lcc_sew3_similar_facets.h
# src/lcc_split_merge.h
# src/lcc_sqrt3_subdivision.h
# src/lcc_surface_normal.h
# src/lcc_surface_simplification.h
# src/lcc_surface_tangential_relaxation.h
# src/lcc_to_face_graph.h
# src/lcc_to_polygon_soup.h
# src/lcc_to_tetgen_io.h
# src/lcc_triangulate_faces.h
# src/Linear_cell_complex_cut_operation.h
# src/Logger.h
# src/MeshComplex_3InTriangulation_3_to_lcc.h
src/My_linear_cell_complex_incremental_builder.h
# src/One_info.h
src/Orientation.h
src/Print_txt.h
src/Prism_and_pyramid_creation.h
# src/Simplify_volumes.h
# src/Tetrahedral_tools.h
# src/triangulation_2_to_lcc.h
# src/Triangulation_3_to_lcc_no_infinite.h
src/Volume_computation.h
# src/Volume_info_for_hexahedral_subdivision.h
src/input_output/import_moka.h
src/input_output/lcc_from_image3.h
src/input_output/lcc_read_ifc.h
src/input_output/lcc_read_write_depending_extension.h
src/input_output/lcc_read_write_voro.h
src/input_output/lcc_read_write_vtk.h
src/input_output/lcc_save_direct.h
src/input_output/lcc_save_load_mesh.h
src/input_output/lcc_save_load_surfaces.h
src/input_output/lcc_save_load_with_assimp.h
src/input_output/lcc_write_decorated_vtk.h
src/query_replace/cmap_query_replace_geometry.h
src/query_replace/cmap_query_replace.h
src/query_replace/cmap_query_replace_load_pattern.h
src/query_replace/cmap_signature.h
src/query_replace/graph_utils.h
src/query_replace/hash_pair.h
src/query_replace/init_to_preserve_for_query_replace.h
src/query_replace/lcc_pattern.h
src/query_replace/lcc_pattern_substituer.h
src/query_replace/lcc_pattern_substituer_multiple_cells.h
src/query_replace/signature_tree.h
)
add_library(lcc_tools_lib SHARED ${src_tools})
target_link_libraries(lcc_tools_lib PUBLIC
CGAL::CGAL
CGAL::CGAL_Qt6
CGAL::CGAL_Basic_viewer
CGAL::Eigen3_support)
if(USE_HXT)
target_link_libraries(lcc_tools_lib PUBLIC HXT)
endif()
add_executable(query_replace_multiple_cells src/query_replace_multiple_cells.cpp)
target_link_libraries(query_replace_multiple_cells PUBLIC lcc_tools_lib)
add_executable(tet2hex src/tet2hex.cpp)
target_link_libraries(tet2hex PUBLIC lcc_tools_lib)
add_executable(generate-terrain src/generate-terrain.cpp)
target_link_libraries(generate-terrain PUBLIC lcc_tools_lib)
################################################################################
