From 38710f1de71e9bb22b3c602dd05fb558092e1fb1 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Fri, 14 Nov 2014 15:25:31 -0800 Subject: Disable PUBLIC declarations when we're compiling the executable. --- src/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 75d41c0..b81146b 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -57,6 +57,10 @@ include (GenerateExportHeader) add_executable(${PROGRAM} ${PROGRAM_SOURCES}) add_compiler_export_flags() +# Disable the PUBLIC declarations when compiling the executable: +set_target_properties(${PROGRAM} PROPERTIES + COMPILE_FLAGS -DCMARK_STATIC_DEFINE) + set(CMAKE_C_VISIBILITY_PRESET hidden) set(CMAKE_VISIBILITY_INLINES_HIDDEN 1) add_library(${LIBRARY} SHARED ${LIBRARY_SOURCES}) -- cgit v1.2.3