Commit 8ae794ed authored by Martin Heistermann's avatar Martin Heistermann

Use cmake builtin EXPORT macro support

parent 655ba2ef
Pipeline #11353 failed with stage
in 7 minutes and 1 second
...@@ -16,7 +16,8 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR ) ...@@ -16,7 +16,8 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
else() else()
set(OVM_STANDALONE_BUILD FALSE) set(OVM_STANDALONE_BUILD FALSE)
endif() endif()
message("OVM_STANDALONE_BUILD: ${OVM_STANDALONE_BUILD}")
#message("OVM_STANDALONE_BUILD: ${OVM_STANDALONE_BUILD}")
set(OVM_ENABLE_UNITTESTS ${OVM_STANDALONE_BUILD} CACHE BOOL "Build OpenVolumeMesh unit tests in 'all' target") set(OVM_ENABLE_UNITTESTS ${OVM_STANDALONE_BUILD} CACHE BOOL "Build OpenVolumeMesh unit tests in 'all' target")
set(OVM_ENABLE_EXAMPLES ${OVM_STANDALONE_BUILD} CACHE BOOL "Build OpenVolumeMesh examples in 'all' target") set(OVM_ENABLE_EXAMPLES ${OVM_STANDALONE_BUILD} CACHE BOOL "Build OpenVolumeMesh examples in 'all' target")
......
SET(HEADER_FILES SET(HEADER_FILES
OpenVolumeMesh/System/FunctionalInclude.hh OpenVolumeMesh/System/FunctionalInclude.hh
OpenVolumeMesh/System/Defines.hh
OpenVolumeMesh/System/MemoryInclude.hh OpenVolumeMesh/System/MemoryInclude.hh
OpenVolumeMesh/System/Deprecation.hh OpenVolumeMesh/System/Deprecation.hh
OpenVolumeMesh/Attribs/TexCoordAttrib.hh OpenVolumeMesh/Attribs/TexCoordAttrib.hh
...@@ -86,6 +85,14 @@ add_library(OpenVolumeMesh ...@@ -86,6 +85,14 @@ add_library(OpenVolumeMesh
) )
add_library(OpenVolumeMesh::OpenVolumeMesh ALIAS OpenVolumeMesh) add_library(OpenVolumeMesh::OpenVolumeMesh ALIAS OpenVolumeMesh)
include(GenerateExportHeader)
generate_export_header(OpenVolumeMesh
BASE_NAME OVM
EXPORT_FILE_NAME "OpenVolumeMesh/Config/Export.hh"
DEPRECATED_MACRO_NAME "CMAKE_OVM_DEPRECATED"
NO_DEPRECATED_MACRO_NAME "CMAKE_OVM_NO_DEPRECATED"
)
set_target_properties (OpenVolumeMesh PROPERTIES set_target_properties (OpenVolumeMesh PROPERTIES
VERSION ${OpenVolumeMesh_VERSION_MAJOR}.${OpenVolumeMesh_VERSION_MINOR} VERSION ${OpenVolumeMesh_VERSION_MAJOR}.${OpenVolumeMesh_VERSION_MINOR}
SOVERSION ${OpenVolumeMesh_VERSION_MAJOR}.${OpenVolumeMesh_VERSION_MINOR}) SOVERSION ${OpenVolumeMesh_VERSION_MAJOR}.${OpenVolumeMesh_VERSION_MINOR})
......
...@@ -41,7 +41,7 @@ ...@@ -41,7 +41,7 @@
#include <vector> #include <vector>
#include <type_traits> #include <type_traits>
#include "../System/Defines.hh" #include "../Config/Export.hh"
#include "OpenVolumeMeshProperty.hh" #include "OpenVolumeMeshProperty.hh"
#include "PropertyHandles.hh" #include "PropertyHandles.hh"
#include "TypeName.hh" #include "TypeName.hh"
...@@ -52,7 +52,7 @@ namespace OpenVolumeMesh { ...@@ -52,7 +52,7 @@ namespace OpenVolumeMesh {
// Forward declarations // Forward declarations
class BaseProperty; class BaseProperty;
class OVMDLLEXPORT ResourceManager { class OVM_EXPORT ResourceManager {
public: public:
ResourceManager() = default; ResourceManager() = default;
ResourceManager(const ResourceManager &other); ResourceManager(const ResourceManager &other);
......
/*===========================================================================*\
* *
* OpenVolumeMesh *
* Copyright (C) 2011 by Computer Graphics Group, RWTH Aachen *
* www.openvolumemesh.org *
* *
*---------------------------------------------------------------------------*
* This file is part of OpenVolumeMesh. *
* *
* OpenVolumeMesh is free software: you can redistribute it and/or modify *
* it under the terms of the GNU Lesser General Public License as *
* published by the Free Software Foundation, either version 3 of *
* the License, or (at your option) any later version with the *
* following exceptions: *
* *
* If other files instantiate templates or use macros *
* or inline functions from this file, or you compile this file and *
* link it with other files to produce an executable, this file does *
* not by itself cause the resulting executable to be covered by the *
* GNU Lesser General Public License. This exception does not however *
* invalidate any other reasons why the executable file might be *
* covered by the GNU Lesser General Public License. *
* *
* OpenVolumeMesh is distributed in the hope that it will be useful, *
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
* GNU Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU LesserGeneral Public *
* License along with OpenVolumeMesh. If not, *
* see <http://www.gnu.org/licenses/>. *
* *
\*===========================================================================*/
/*===========================================================================*\
* *
* $Revision$ *
* $Date$ *
* $LastChangedBy$ *
* *
\*===========================================================================*/
#ifndef DEFINES_HH_
#define DEFINES_HH_
#ifndef OVMDLLEXPORT
#ifdef WIN32
#ifdef OVMDLL
#ifdef BUILDOVM
#define OVMDLLEXPORT __declspec(dllexport)
#define OVMDLLEXPORTONLY __declspec(dllexport)
#else
#define OVMDLLEXPORT __declspec(dllimport)
#define OVMDLLEXPORTONLY
#endif
#else
#define OVMDLLEXPORT
#define OVMDLLEXPORTONLY
#endif
#else
#define OVMDLLEXPORT
#define OVMDLLEXPORTONLY
#endif
#endif
#endif /* DEFINES_HH_ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment