From: navarrop Date: Wed, 16 Jun 2010 10:25:56 +0000 (+0000) Subject: Declare variable DLL_EXPORT for Libs. X-Git-Tag: v3_5~933 X-Git-Url: http://info.iut-bm.univ-fcomte.fr/pub/gitweb/simgrid.git/commitdiff_plain/9d85ead7a4eb80631f931e45d894a446c7e73bb6?hp=2bfdf7dcd62e167691a42f4766d3e1475f3724a9 Declare variable DLL_EXPORT for Libs. git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/simgrid/simgrid/trunk@7876 48e7efb5-ca39-0410-a469-dd3cf9ba447f --- diff --git a/buildtools/Cmake/MakeExeLib.cmake b/buildtools/Cmake/MakeExeLib.cmake index d745412580..0c08e0ebf6 100644 --- a/buildtools/Cmake/MakeExeLib.cmake +++ b/buildtools/Cmake/MakeExeLib.cmake @@ -1,4 +1,10 @@ ### Make Libs +foreach(file ${simgrid_sources}) + set_source_files_properties(${file} PROPERTIES COMPILE_FLAGS "/D DLL_EXPORT") +endforeach(file ${simgrid_sources}) +foreach(file ${gras_sources}) + set_source_files_properties(${file} PROPERTIES COMPILE_FLAGS "/D DLL_EXPORT") +endforeach(file ${gras_sources}) if(enable_supernovae AND NOT WIN32) include(${PROJECT_DIRECTORY}/buildtools/Cmake/Supernovae.cmake) @@ -17,14 +23,13 @@ if(enable_smpi) set_target_properties(smpi PROPERTIES VERSION ${libsmpi_version}) endif(enable_smpi) - -set(GRAS_DEP "-lm -lpthread") -set(SIMGRID_DEP "-lm") -set(SMPI_DEP "") - if(WIN32) set(GRAS_DEP "wsock32") set(SIMGRID_DEP "wsock32") +else(WIN32) + set(GRAS_DEP "-lm -lpthread") + set(SIMGRID_DEP "-lm") + set(SMPI_DEP "") endif(WIN32) if(HAVE_RUBY) diff --git a/buildtools/Cmake/gras_config.h.in b/buildtools/Cmake/gras_config.h.in index ba3c427c5f..4cdeafdd8e 100644 --- a/buildtools/Cmake/gras_config.h.in +++ b/buildtools/Cmake/gras_config.h.in @@ -15,7 +15,6 @@ #cmakedefine WIN32 @WIN32@ #endif #ifdef _WIN32 - #define DLL_EXPORT #define __VISUALC__ #endif diff --git a/include/simgrid_config.h.in b/include/simgrid_config.h.in index 612a80fa7a..35e54e4a00 100644 --- a/include/simgrid_config.h.in +++ b/include/simgrid_config.h.in @@ -8,8 +8,8 @@ * under the terms of the license (GNU LGPL) which comes with this package. */ #include "xbt/misc.h" /* XBT_PUBLIC */ -#ifdef _WIN32 - #define DLL_EXPORT +#ifndef DLL_EXPORT + #define DLL_IMPORT #endif #ifndef SIMGRID_PUBLIC_CONFIG_H