Skip to content
Snippets Groups Projects
Commit 3e2865b4 authored by Tony Kelman's avatar Tony Kelman Committed by Brad King
Browse files

GenerateExportHeader: Use dllexport/dllimport on Cygwin

Cygwin sits on top of Windows and so can use explicit symbol
export and import markup too.

Co-Author: Yaakov Selkowitz <yselkowitz@cygwin.com>
parent 27e4b21d
No related branches found
No related tags found
No related merge requests found
......@@ -268,7 +268,7 @@ macro(_DO_SET_MACRO_VALUES TARGET_LIBRARY)
get_property(type TARGET ${TARGET_LIBRARY} PROPERTY TYPE)
if(NOT ${type} STREQUAL "STATIC_LIBRARY")
if(WIN32)
if(WIN32 OR CYGWIN)
set(DEFINE_EXPORT "__declspec(dllexport)")
set(DEFINE_IMPORT "__declspec(dllimport)")
elseif(COMPILER_HAS_HIDDEN_VISIBILITY AND USE_COMPILER_HIDDEN_VISIBILITY)
......
......@@ -106,10 +106,10 @@ endif()
add_executable(GenerateExportHeader exportheader_test.cpp)
target_link_libraries(GenerateExportHeader ${link_libraries})
if (WIN32)
if (WIN32 OR CYGWIN)
if(MSVC AND COMPILER_HAS_DEPRECATED)
set(_platform Win32)
elseif(MINGW AND COMPILER_HAS_DEPRECATED)
elseif((MINGW OR CYGWIN) AND COMPILER_HAS_DEPRECATED)
set(_platform MinGW)
else()
set(_platform WinEmpty)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment