Commit 34b8dbee by Christophe Geuzaine

dllexprt only when building the dll

parent 0ee53857
Pipeline #942 passed with stage
in 39 minutes 44 seconds
......@@ -1472,8 +1472,13 @@ endif(ENABLE_BUILD_LIB)
# shared library target
if(ENABLE_BUILD_SHARED OR ENABLE_BUILD_DYNAMIC)
# FIXME: change this once we understand rpaths
set(CMAKE_MACOSX_RPATH 0)
if(APPLE)
# FIXME: change this once we understand rpaths
set(CMAKE_MACOSX_RPATH 0)
endif(APPLE)
if(WIN32)
add_definitions(-DGMSH_DLL_EXPORT)
endif(WIN32)
add_library(shared SHARED ${GMSH_SRC})
set_target_properties(shared PROPERTIES OUTPUT_NAME gmsh
VERSION ${GMSH_MAJOR_VERSION}.${GMSH_MINOR_VERSION}.${GMSH_PATCH_VERSION}
......
......@@ -254,7 +254,7 @@ cpp_header="""// Gmsh - Copyright (C) 1997-2017 C. Geuzaine, J.-F. Remacle
#include <vector>
#include <string>
#if defined(WIN32)
#if defined(GMSH_DLL_EXPORT)
#define GMSH_API __declspec(dllexport)
#else
#define GMSH_API
......@@ -302,7 +302,7 @@ c_header="""/*
* tutorials from `gmsh/tutorials'.
*/
#if defined(WIN32)
#if defined(GMSH_DLL_EXPORT)
#define GMSH_API __declspec(dllexport)
#else
#define GMSH_API
......
......@@ -22,7 +22,7 @@
#include <vector>
#include <string>
#if defined(WIN32)
#if defined(GMSH_DLL_EXPORT)
#define GMSH_API __declspec(dllexport)
#else
#define GMSH_API
......
......@@ -22,7 +22,7 @@
* tutorials from `gmsh/tutorials'.
*/
#if defined(WIN32)
#if defined(GMSH_DLL_EXPORT)
#define GMSH_API __declspec(dllexport)
#else
#define GMSH_API
......
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