Skip to content

Commit b9efd69

Browse files
committed
replace macro CGAL_USE_BASIC_VIEWER by CGAL_USE_BASIC_VIEWER_QT
1 parent d65526c commit b9efd69

File tree

65 files changed

+173
-180
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+173
-180
lines changed

Arrangement_on_surface_2/doc/Arrangement_on_surface_2/Arrangement_on_surface_2.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6859,8 +6859,8 @@ An arrangement data structure can be visualized by calling the \link PkgArrangem
68596859

68606860
\cgalExample{Arrangement_on_surface_2/draw_arr.cpp}
68616861

6862-
This function requires `CGAL_Qt6`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined.
6863-
Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt6` and add the definition `CGAL_USE_BASIC_VIEWER`.
6862+
This function requires `CGAL_Qt6`, and is only available if the macro `CGAL_USE_BASIC_VIEWER_QT` is defined.
6863+
Linking with the cmake target `CGAL::CGAL_Basic_viewer_Qt` will link with `CGAL_Qt6` and add the definition `CGAL_USE_BASIC_VIEWER_QT`.
68646864

68656865
\cgalFigureBegin{aos_fig-draw_arr,draw_arr.png}
68666866
A snapshot of the window created by the program

Arrangement_on_surface_2/doc/Arrangement_on_surface_2/CGAL/draw_arrangement_2.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,8 @@ namespace CGAL {
2929
* `CGAL::Arrangement_2` class template. Parameters of the drawing are taken
3030
* from the optional graphics scene options parameter.
3131
*
32-
A call to this function blocks the execution of the program until the drawing window is closed. This function requires `CGAL_Qt6`, and is only available if the macro `CGAL_USE_BASIC_VIEWER`/`CGAL_USE_BASIC_VIEWER_QT` (Qt viewer) is defined.
33-
Linking with the cmake target `CGAL::CGAL_Basic_viewer`/`CGAL::CGAL_Basic_viewer_Qt` will link with `CGAL_Qt6` and add the definition `CGAL_USE_BASIC_VIEWER`/`CGAL_USE_BASIC_VIEWER_QT`.
32+
A call to this function blocks the execution of the program until the drawing window is closed. This function requires `CGAL_Qt6`, and is only available if the macro `CGAL_USE_BASIC_VIEWER_QT` (Qt viewer) is defined.
33+
Linking with the cmake target `CGAL::CGAL_Basic_viewer_Qt` will link with `CGAL_Qt6` and add the definition `CGAL_USE_BASIC_VIEWER_QT`.
3434
*
3535
* \tparam GeometryTraits_2 a geometry traits type, a model of a 2D arrangement
3636
* traits concept. At this point it must be an instance of either

Arrangement_on_surface_2/examples/Arrangement_on_surface_2/CMakeLists.txt

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ foreach(cppfile ${cppfiles})
1616
endforeach()
1717

1818
if(CGAL_Qt6_FOUND)
19-
target_link_libraries(draw_arr PRIVATE CGAL::CGAL_Basic_viewer)
20-
target_link_libraries(linear_conics PRIVATE CGAL::CGAL_Basic_viewer)
21-
target_link_libraries(parabolas PRIVATE CGAL::CGAL_Basic_viewer)
22-
target_link_libraries(ellipses PRIVATE CGAL::CGAL_Basic_viewer)
23-
target_link_libraries(hyperbolas PRIVATE CGAL::CGAL_Basic_viewer)
24-
target_link_libraries(polylines PRIVATE CGAL::CGAL_Basic_viewer)
25-
target_link_libraries(circles PRIVATE CGAL::CGAL_Basic_viewer)
26-
target_link_libraries(circular_arcs PRIVATE CGAL::CGAL_Basic_viewer)
27-
target_link_libraries(spherical_insert PRIVATE CGAL::CGAL_Basic_viewer)
19+
target_link_libraries(draw_arr PRIVATE CGAL::CGAL_Basic_viewer_Qt)
20+
target_link_libraries(linear_conics PRIVATE CGAL::CGAL_Basic_viewer_Qt)
21+
target_link_libraries(parabolas PRIVATE CGAL::CGAL_Basic_viewer_Qt)
22+
target_link_libraries(ellipses PRIVATE CGAL::CGAL_Basic_viewer_Qt)
23+
target_link_libraries(hyperbolas PRIVATE CGAL::CGAL_Basic_viewer_Qt)
24+
target_link_libraries(polylines PRIVATE CGAL::CGAL_Basic_viewer_Qt)
25+
target_link_libraries(circles PRIVATE CGAL::CGAL_Basic_viewer_Qt)
26+
target_link_libraries(circular_arcs PRIVATE CGAL::CGAL_Basic_viewer_Qt)
27+
target_link_libraries(spherical_insert PRIVATE CGAL::CGAL_Basic_viewer_Qt)
2828
else()
2929
message(
3030
STATUS

Basic_viewer/doc/Basic_viewer/CGAL/Qt/Basic_viewer.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace CGAL {
55
/*!
66
\ingroup PkgBasicViewerClasses
77
8-
The class `Basic_viewer` is a Qt widget based on `QGLViewer` that allows to visualize 3D elements: points, segments, triangles, rays and lines. This class stores a reference to a `Graphics_scene`. Elements are added through the scene. This class requires `CGAL_Qt6`, and is only available if the macro `CGAL_USE_BASIC_VIEWER_QT` is defined. Linking with the cmake target `CGAL::CGAL_Basic_viewer` or `CGAL::CGAL_Basic_viewer_Qt` will link with `CGAL_Qt6` and add the definition `CGAL_USE_BASIC_VIEWER` & `CGAL_USE_BASIC_VIEWER_QT`.
8+
The class `Basic_viewer` is a Qt widget based on `QGLViewer` that allows to visualize 3D elements: points, segments, triangles, rays and lines. This class stores a reference to a `Graphics_scene`. Elements are added through the scene. This class requires `CGAL_Qt6`, and is only available if the macro `CGAL_USE_BASIC_VIEWER_QT` is defined. Linking with the cmake target `CGAL::CGAL_Basic_viewer_Qt` will link with `CGAL_Qt6` and add the definition `CGAL_USE_BASIC_VIEWER_QT`.
99
1010
CGAL::QGLViewer is our internal fork of <a href="https://github.com/GillesDebunne/libQGLViewer">QGLViewer class</a> which is <em>A versatile 3D OpenGL viewer based on QOpenGLWidget</em>.
1111
*/
@@ -207,7 +207,7 @@ class Basic_viewer : public CGAL::QGLViewer
207207
208208
The class `QApplication_and_basic_viewer` regroups a `Basic_viewer` and Qt `QApplication`. The `QApplication` is created in the constructor, but started by the `run()` method. This allows for example users to modify the `on_key_pressed` method of the `Basic_viewer` to define their own behavior.
209209
210-
This class requires `CGAL_Qt6`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` or `CGAL_USE_BASIC_VIEWER_QT` is defined. Linking with the cmake target `CGAL::CGAL_Basic_viewer` or `CGAL::CGAL_Basic_viewer_Qt` will link with `CGAL_Qt6` and add the definition `CGAL_USE_BASIC_VIEWER` & `CGAL_USE_BASIC_VIEWER_QT`.
210+
This class requires `CGAL_Qt6`, and is only available if the macro `CGAL_USE_BASIC_VIEWER_QT` is defined. Linking with the cmake target `CGAL::CGAL_Basic_viewer_Qt` will link with `CGAL_Qt6` and add the definition `CGAL_USE_BASIC_VIEWER_QT`.
211211
212212
*/
213213
class QApplication_and_basic_viewer
@@ -230,7 +230,7 @@ class QApplication_and_basic_viewer
230230
/*!
231231
\ingroup PkgBasicViewerClasses
232232
233-
opens a new window and draws the given `Graphics_scene` (which must have been filled before). `title` will be the title of the window. A call to this method is blocking, that is the program continues as soon as the user closes the window. This function requires `CGAL_Qt6`, and is only available if the macro `CGAL_USE_BASIC_VIEWER` is defined. Linking with the cmake target `CGAL::CGAL_Basic_viewer` will link with `CGAL_Qt6` and add the definition CGAL_USE_BASIC_VIEWER.
233+
opens a new window and draws the given `Graphics_scene` (which must have been filled before). `title` will be the title of the window. A call to this method is blocking, that is the program continues as soon as the user closes the window. This function requires `CGAL_Qt6`, and is only available if the macro `CGAL_USE_BASIC_VIEWER_QT` is defined. Linking with the cmake target `CGAL::CGAL_Basic_viewer_Qt` will link with `CGAL_Qt6` and add the definition CGAL_USE_BASIC_VIEWER_QT.
234234
*/
235235
void draw_graphics_scene(const Graphics_scene& graphic_scene,
236236
const char *title="CGAL Basic Viewer")

Boolean_set_operations_2/examples/Boolean_set_operations_2/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ foreach(cppfile ${cppfiles})
1616
endforeach()
1717

1818
if(CGAL_Qt6_FOUND)
19-
target_link_libraries(draw_polygon_set PRIVATE CGAL::CGAL_Basic_viewer)
19+
target_link_libraries(draw_polygon_set PRIVATE CGAL::CGAL_Basic_viewer_Qt)
2020
else()
2121
message(STATUS "NOTICE: The example 'draw_polygon_set' requires Qt and drawing will be disabled.")
2222
endif()

Boolean_set_operations_2/include/CGAL/draw_polygon_set_2.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,7 @@ void compute_elements(const PWH& pwh,
166166

167167
} // End namespace draw_function_for_boolean_set_2
168168

169-
#if defined(CGAL_USE_BASIC_VIEWER_QT) || defined(CGAL_USE_BASIC_VIEWER)
169+
#if defined(CGAL_USE_BASIC_VIEWER_QT)
170170

171171
template <typename PolygonSet_2, typename GSOptions>
172172
class Polygon_set_2_basic_viewer_qt : public Basic_viewer
@@ -259,7 +259,7 @@ class Polygon_set_2_basic_viewer_qt : public Basic_viewer
259259
GSOptions& gso;
260260
};
261261

262-
#endif // CGAL_USE_BASIC_VIEWER
262+
#endif // CGAL_USE_BASIC_VIEWER_QT
263263

264264
#define CGAL_PS2_TYPE CGAL::Polygon_set_2<T, C, D>
265265

@@ -281,7 +281,7 @@ void add_to_graphics_scene(const CGAL_PS2_TYPE& ap2,
281281
draw_function_for_boolean_set_2::compute_elements(ap2, graphics_scene, gso);
282282
}
283283

284-
#ifdef CGAL_USE_BASIC_VIEWER
284+
#ifdef CGAL_USE_BASIC_VIEWER_QT
285285

286286
// Specialization of draw function.
287287
template<class T, class C, class D, class GSOptions>
@@ -319,7 +319,7 @@ void draw(const CGAL_PS2_TYPE& ps,
319319
draw(ps, gso, title);
320320
}
321321

322-
#endif // CGAL_USE_BASIC_VIEWER_QT || CGAL_USE_BASIC_VIEWER
322+
#endif // CGAL_USE_BASIC_VIEWER_QT
323323

324324
#undef CGAL_PS2_TYPE
325325

Documentation/doc/Documentation/Developer_manual/create_and_use_a_cmakelist.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ This section describes a minimal example of a program that uses \cgal and Qt6 fo
4343

4444

4545
\skip if(CGAL_Qt6_FOUND)
46-
\until target_link_libraries(draw_surface_mesh PRIVATE CGAL::CGAL_Basic_viewer)
46+
\until target_link_libraries(draw_surface_mesh PRIVATE CGAL::CGAL_Basic_viewer_Qt)
4747
\skip endif
4848
\until #end of the file
4949

Installation/cmake/modules/CGALConfig_binary.cmake.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -208,10 +208,10 @@ endif()
208208
#
209209
# Define a specific target for basic viewer
210210
#
211-
if (NOT TARGET CGAL::CGAL_Basic_viewer)
212-
add_library(CGAL::CGAL_Basic_viewer INTERFACE IMPORTED GLOBAL)
213-
set_target_properties(CGAL::CGAL_Basic_viewer PROPERTIES
214-
INTERFACE_COMPILE_DEFINITIONS "CGAL_USE_BASIC_VIEWER;QT_NO_KEYWORDS"
211+
if (NOT TARGET CGAL::CGAL_Basic_viewer_Qt)
212+
add_library(CGAL::CGAL_Basic_viewer_Qt INTERFACE IMPORTED GLOBAL)
213+
set_target_properties(CGAL::CGAL_Basic_viewer_Qt PROPERTIES
214+
INTERFACE_COMPILE_DEFINITIONS "CGAL_USE_BASIC_VIEWER_QT;QT_NO_KEYWORDS"
215215
INTERFACE_LINK_LIBRARIES CGAL::CGAL_Qt6)
216216
endif()
217217

Installation/cmake/modules/CGALConfig_install.cmake.in

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ endif()
193193
#
194194
# Define a specific target for basic viewer
195195
#
196-
if (NOT TARGET CGAL::CGAL_Basic_viewer)
197-
add_library(CGAL::CGAL_Basic_viewer INTERFACE IMPORTED GLOBAL)
198-
set_target_properties(CGAL::CGAL_Basic_viewer PROPERTIES
199-
INTERFACE_COMPILE_DEFINITIONS "CGAL_USE_BASIC_VIEWER;QT_NO_KEYWORDS"
196+
if (NOT TARGET CGAL::CGAL_Basic_viewer_Qt)
197+
add_library(CGAL::CGAL_Basic_viewer_Qt INTERFACE IMPORTED GLOBAL)
198+
set_target_properties(CGAL::CGAL_Basic_viewer_Qt PROPERTIES
199+
INTERFACE_COMPILE_DEFINITIONS "CGAL_USE_BASIC_VIEWER_QT;QT_NO_KEYWORDS"
200200
INTERFACE_LINK_LIBRARIES CGAL::CGAL_Qt6)
201201
endif()
202202

Installation/cmake/modules/CGAL_add_test.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function(cgal_add_compilation_test exe_name)
124124
if(TARGET CGAL_Qt6_moc_and_resources) # if CGAL_Qt6 was searched, and is header-only
125125
get_property(linked_libraries TARGET "${exe_name}" PROPERTY LINK_LIBRARIES)
126126
# message(STATUS "${exe_name} depends on ${linked_libraries}")
127-
if( ("CGAL_Qt6" IN_LIST linked_libraries OR "CGAL::CGAL_Qt6" IN_LIST linked_libraries OR "CGAL::CGAL_Basic_viewer" IN_LIST linked_libraries)
127+
if( ("CGAL_Qt6" IN_LIST linked_libraries OR "CGAL::CGAL_Qt6" IN_LIST linked_libraries OR "CGAL::CGAL_Basic_viewer_Qt" IN_LIST linked_libraries)
128128
AND NOT TARGET "compilation_of__CGAL_Qt6_moc_and_resources")
129129
# This custom target is useless. It is used only as a flag to
130130
# detect that the test has already been created.

0 commit comments

Comments
 (0)