Skip to content

Commit

Permalink
use MSVC instead of Windows to detect symbols export flag
Browse files Browse the repository at this point in the history
  • Loading branch information
Angel Sánchez committed Feb 6, 2020
1 parent 5fe8614 commit 3450d1b
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions ports/cairo/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,16 @@ set(CAIRO_GOBJECT_SOURCES

# GObject support sources do not include header with export macro
if(BUILD_SHARED_LIBS)
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
if(MSVC)
set_source_files_properties(
"../util/cairo-gobject/cairo-gobject-enums.c"
"../util/cairo-gobject/cairo-gobject-structs.c"
PROPERTIES COMPILE_DEFINITIONS "cairo_public=__declspec(dllexport)")
"../util/cairo-gobject/cairo-gobject-enums.c"
"../util/cairo-gobject/cairo-gobject-structs.c"
PROPERTIES COMPILE_DEFINITIONS "cairo_public=__declspec(dllexport)")
else()
set_source_files_properties(
"../util/cairo-gobject/cairo-gobject-enums.c"
"../util/cairo-gobject/cairo-gobject-structs.c"
PROPERTIES COMPILE_DEFINITIONS "cairo_public=__attribute__((visibility(\"default\")))")
set_source_files_properties(
"../util/cairo-gobject/cairo-gobject-enums.c"
"../util/cairo-gobject/cairo-gobject-structs.c"
PROPERTIES COMPILE_DEFINITIONS "cairo_public=__attribute__((visibility(\"default\")))")
endif()
endif()

Expand Down

0 comments on commit 3450d1b

Please sign in to comment.