diff --git a/CGAL_Core/include/CGAL/export/CORE.h b/CGAL_Core/include/CGAL/export/CORE.h index b0c48d051dd..81d95941d28 100644 --- a/CGAL_Core/include/CGAL/export/CORE.h +++ b/CGAL_Core/include/CGAL/export/CORE.h @@ -47,7 +47,8 @@ // If CGAL_EXPORTS is defined, one are building the CGAL library, and we do // not want artificial dll-imports of Core symbols (because of // auto-linking). -#if ( ! defined(CGAL_EXPORTS) ) && defined(CGAL_BUILD_SHARED_LIBS) +#if ( ! defined(CGAL_EXPORTS) ) && defined(CGAL_BUILD_SHARED_LIBS) \ + && ( ! defined(CGAL_HEADER_ONLY) ) # if defined(CGAL_Core_EXPORTS) // defined by CMake or in cpp files of the dll diff --git a/CGAL_ImageIO/include/CGAL/export/ImageIO.h b/CGAL_ImageIO/include/CGAL/export/ImageIO.h index 01eb5d08618..cf5e18623ec 100644 --- a/CGAL_ImageIO/include/CGAL/export/ImageIO.h +++ b/CGAL_ImageIO/include/CGAL/export/ImageIO.h @@ -23,7 +23,7 @@ #include #include -#if defined(CGAL_BUILD_SHARED_LIBS) +#if defined(CGAL_BUILD_SHARED_LIBS) && ! defined(CGAL_HEADER_ONLY) # if defined(CGAL_ImageIO_EXPORTS) // defined by CMake or in cpp files of the dll diff --git a/GraphicsView/include/CGAL/export/Qt.h b/GraphicsView/include/CGAL/export/Qt.h index 4c45283cc0c..5833ba1f2bf 100644 --- a/GraphicsView/include/CGAL/export/Qt.h +++ b/GraphicsView/include/CGAL/export/Qt.h @@ -26,7 +26,8 @@ #include #include -#if defined(CGAL_BUILD_SHARED_LIBS) || defined(CGAL_USE_Qt5_RESOURCES) +#if ( defined(CGAL_BUILD_SHARED_LIBS) && ( ! defined(CGAL_HEADER_ONLY) ) ) \ + || defined(CGAL_USE_Qt5_RESOURCES) # if defined(CGAL_Qt5_EXPORTS) || defined(CGAL_USE_Qt5_RESOURCES) // defined by CMake or in cpp files of the dll diff --git a/Installation/include/CGAL/export/CGAL.h b/Installation/include/CGAL/export/CGAL.h index a31c17de563..1d625efc251 100644 --- a/Installation/include/CGAL/export/CGAL.h +++ b/Installation/include/CGAL/export/CGAL.h @@ -23,7 +23,7 @@ #include #include -#if defined(CGAL_BUILD_SHARED_LIBS) +#if defined(CGAL_BUILD_SHARED_LIBS) && ! defined(CGAL_HEADER_ONLY) # if defined(CGAL_EXPORTS) // defined by CMake or in cpp files of the dll