aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Müller <muemart@users.noreply.github.com>2017-05-01 17:48:48 +0200
committerMartin Müller <muemart@users.noreply.github.com>2017-05-01 17:48:48 +0200
commitcd9fc747762dc22d41aacb9f473b6216a6ff1494 (patch)
tree0308da61e7a3748ccfbd2e6bde0091e183407cfa
parent4b702645bdab75b986257c814c61040c7ec85332 (diff)
downloadvcpkg-cd9fc747762dc22d41aacb9f473b6216a6ff1494.tar.gz
vcpkg-cd9fc747762dc22d41aacb9f473b6216a6ff1494.zip
Correctly export all symbols, and use properties to set the dll define
-rw-r--r--ports/libgsl/CMakeLists.txt7
1 files changed, 1 insertions, 6 deletions
diff --git a/ports/libgsl/CMakeLists.txt b/ports/libgsl/CMakeLists.txt
index 2173890fe..704542035 100644
--- a/ports/libgsl/CMakeLists.txt
+++ b/ports/libgsl/CMakeLists.txt
@@ -2,7 +2,6 @@ cmake_minimum_required(VERSION 3.8)
project(libgsl C)
option(INSTALL_HEADERS "Install public header files" ON)
-set(WINDOWS_EXPORT_ALL_SYMBOLS ON)
# Function to extract parameter from makefile. Space separated values are returned as lists
function(extract_from_makefile PATTERN RETURN FILEPATH)
@@ -45,6 +44,7 @@ file(GLOB_RECURSE PUBLIC_HEADERS gsl*.h)
list(APPEND PUBLIC_HEADERS ${CMAKE_CURRENT_BINARY_DIR}/gsl_types.h)
add_library(libgsl ${SOURCES})
+set_target_properties(libgsl PROPERTIES DEFINE_SYMBOL DLL_EXPORT WINDOWS_EXPORT_ALL_SYMBOLS ON)
if(INSTALL_HEADERS)
set_target_properties(libgsl PROPERTIES PUBLIC_HEADER "${PUBLIC_HEADERS}")
@@ -53,11 +53,6 @@ target_include_directories(libgsl PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
# For the build, we need to copy all headers to the gsl directory
file(COPY ${PUBLIC_HEADERS} DESTINATION "${CMAKE_CURRENT_SOURCE_DIR}/gsl")
-if(BUILD_SHARED_LIBS)
- target_compile_definitions(libgsl PRIVATE -DDLL_EXPORT)
-endif()
-
-
set(TARGET_INSTALL_OPTIONS)
if(INSTALL_HEADERS)
set(TARGET_INSTALL_OPTIONS PUBLIC_HEADER DESTINATION include/gsl)