Also support the compilation of CGAL libraries as static libs, with MSVC.

This commit is contained in:
Laurent Rineau 2011-10-06 16:01:16 +00:00
parent 62890f10e8
commit aa00f78883
6 changed files with 8 additions and 8 deletions

View File

@ -22,7 +22,7 @@
#include <boost/config.hpp>
#if defined(BOOST_MSVC)
#if defined(BOOST_MSVC) && defined(CGAL_BUILD_SHARED_LIB)
#if defined(CGAL_ImageIO_EXPORTS) // add by CMake or in cpp files of the dll
#define CGAL_IMAGEIO_EXPORT __declspec (dllexport)

View File

@ -42,7 +42,7 @@
#include <boost/config.hpp>
#if defined(BOOST_MSVC) && ( ! defined(CGAL_EXPORTS) )
#if defined(BOOST_MSVC) && ( ! defined(CGAL_EXPORTS) ) && defined(CGAL_BUILD_SHARED_LIB)
#if defined(CGAL_Core_EXPORTS) // add by CMake or in cpp files of the dll
#define CGAL_CORE_EXPORT __declspec (dllexport)

View File

@ -21,7 +21,7 @@
#include <boost/config.hpp>
#if defined(BOOST_MSVC)
#if defined(BOOST_MSVC) && defined(CGAL_BUILD_SHARED_LIB)
#if defined(CGAL_Qt4_EXPORTS) // add by CMake or in cpp files of the dll
#define CGAL_QT4_EXPORT __declspec (dllexport)

View File

@ -483,6 +483,7 @@ add_config_flag( CGAL_USE_LEDA )
add_config_flag( CGAL_USE_MPFI )
add_config_flag( CGAL_USE_RS )
add_config_flag( CGAL_USE_NTL )
add_config_flag( CGAL_BUILD_SHARED_LIB )
set(CGAL_USE_CORE ${CGAL_USE_GMP})

View File

@ -29,10 +29,9 @@ if( NOT CGAL_COMMON_FILE_INCLUDED )
set( CMAKE_2_6_3_OR_ABOVE FALSE )
endif()
if ( "${BUILD_SHARED_LIBS}" STREQUAL "" )
set(BUILD_SHARED_LIBS ON)
endif()
option(BUILD_SHARED_LIBS "Build shared libraries" ON)
set(CGAL_BUILD_SHARED_LIB ${BUILD_SHARED_LIBS})
if ( CGAL_BUILDING_LIBS )
if ( BUILD_SHARED_LIBS )
message( STATUS "Building shared libraries" )

View File

@ -22,7 +22,7 @@
#include <boost/config.hpp>
#if defined(BOOST_MSVC)
#if defined(BOOST_MSVC) && defined(CGAL_BUILD_SHARED_LIB)
#if defined(CGAL_EXPORTS) // add by CMake or in cpp files of the dll
#define CGAL_EXPORT __declspec (dllexport)