Skip to content

Commit

Permalink
Support visibility change in Makefile and autotools
Browse files Browse the repository at this point in the history
  • Loading branch information
j-rivero committed Nov 10, 2017
1 parent a5a3d34 commit a38c896
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 9 deletions.
1 change: 0 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ set(CCD_SOVERSION 2)
# Include GNUInstallDirs to get canonical paths
include(GNUInstallDirs)
include(CTest)
include(GenerateExportHeader)

option(BUILD_DOCUMENTATION "Build the documentation" OFF)

Expand Down
7 changes: 1 addition & 6 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ configure_file(ccd/config.h.cmake.in ccd/config.h)
set(CCD_INCLUDES
ccd/ccd.h
ccd/compiler.h
ccd/ccd_export.h
ccd/quat.h
ccd/vec3.h
"${CMAKE_CURRENT_BINARY_DIR}/ccd/config.h")
Expand Down Expand Up @@ -85,9 +86,3 @@ endif()
if(NOT WIN32 AND BUILD_TESTING AND NOT CCD_HIDE_ALL_SYMBOLS)
add_subdirectory(testsuites)
endif()

get_property(type TARGET ccd PROPERTY TYPE)

generate_export_header(ccd)
install(FILES ${PROJECT_BINARY_DIR}/src/ccd_export.h
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

-include Makefile.include

CFLAGS += -I.
CFLAGS += -I. -fvisibility=hidden

TARGETS = libccd.a
OBJS = ccd.o mpr.o support.o vec3.o polytope.o
Expand Down
2 changes: 2 additions & 0 deletions src/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ libccd_la_SOURCES = alloc.h \
ccd/compiler.h \
dbg.h \
ccd.c ccd/ccd.h \
ccd/ccd_export.h \
list.h \
polytope.c polytope.h \
ccd/quat.h \
Expand All @@ -14,3 +15,4 @@ libccd_la_SOURCES = alloc.h \
vec3.c ccd/vec3.h \
mpr.c

libccd_la_CFLAGS = -fvisibility=hidden
2 changes: 1 addition & 1 deletion src/ccd/vec3.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <stdlib.h>
#include <ccd/compiler.h>
#include <ccd/config.h>
#include "ccd_export.h"
#include <ccd/ccd_export.h>

#ifdef __cplusplus
extern "C" {
Expand Down

0 comments on commit a38c896

Please sign in to comment.