Commit 193422e6 authored by Julien Wintz's avatar Julien Wintz
Browse files

Project wise setting of visibility properties.

parent fe0e0bb2
......@@ -12,13 +12,6 @@
##
### Code:
## ###################################################################
## Build setup
## ###################################################################
set(CMAKE_CXX_VISIBILITY_PRESET hidden)
set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
## #################################################################
## Essential layer
## #################################################################
......
......@@ -274,6 +274,8 @@ add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
......
......@@ -398,7 +398,6 @@ set(${PROJECT_NAME}_SOURCES ${${PROJECT_NAME}_SOURCES}
dtkComposerNodeTrackerVrpn.cpp)
endif(DTK_HAVE_VRPN AND DTK_BUILD_VR)
## #################################################################
## Build rules
## #################################################################
......@@ -448,6 +447,8 @@ target_link_libraries(${PROJECT_NAME} Qt5::Xml)
## Target properties
## #################################################################
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
......
......@@ -65,6 +65,8 @@ target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
## Target properties
## #################################################################
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
......
......@@ -108,6 +108,8 @@ target_link_libraries(${PROJECT_NAME} Qt5::Core)
## Target properties
## #################################################################
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
......
......@@ -14,12 +14,10 @@
project(dtkCoreSupport)
if(DTK_BUILD_SUPPORT_CORE AND NOT DTK_BUILD_SUPPORT_MATH)
message(SEND_ERROR "You can't select \"DTK_BUILD_SUPPORT_CORE\" because it's dependencies (DTK_BUILD_SUPPORT_MATH) were not met")
endif()
## #################################################################
## Sources
## #################################################################
......@@ -162,6 +160,8 @@ endif(DTK_BUILD_WRAPPERS AND SWIG_FOUND)
## Target properties
## #################################################################
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
......
......@@ -60,8 +60,7 @@ set(${PROJECT_NAME}_HEADERS
dtkDistributedSettings.h
dtkDistributedSlave.h
qthDistributedBufferManager.h
qthDistributedCommunicator.h
)
qthDistributedCommunicator.h)
set(${PROJECT_NAME}_SOURCES
dtkDistributed.cpp
......@@ -86,8 +85,7 @@ set(${PROJECT_NAME}_SOURCES
dtkDistributedServerDaemon.cpp
dtkDistributedSettings.cpp
dtkDistributedSlave.cpp
qthDistributedCommunicator.cpp
)
qthDistributedCommunicator.cpp)
## #################################################################
## Build rules
......@@ -97,6 +95,8 @@ add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
......
......@@ -125,8 +125,7 @@ endif(DTK_HAVE_MPI)
add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS}
)
${${PROJECT_NAME}_HEADERS})
target_link_libraries(${PROJECT_NAME} Qt5::Network)
target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
......@@ -139,7 +138,7 @@ target_link_libraries(${PROJECT_NAME}
dtkWidgets)
if(DTK_HAVE_MPI)
target_link_libraries(${PROJECT_NAME} ${MPI_LIBRARIES})
target_link_libraries(${PROJECT_NAME} ${MPI_LIBRARIES})
endif(DTK_HAVE_MPI)
## #################################################################
......@@ -161,6 +160,8 @@ set(${PROJECT_NAME}_HEADERS
## Target properties
## #################################################################
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
......
......@@ -49,8 +49,7 @@ set(${PROJECT_NAME}_HEADERS
dtkViewListControl.h)
if(DTK_BUILD_SCRIPT)
set(${PROJECT_NAME}_HEADERS ${${PROJECT_NAME}_HEADERS}
dtkInterpreter.h)
set(${PROJECT_NAME}_HEADERS ${${PROJECT_NAME}_HEADERS} dtkInterpreter.h)
endif(DTK_BUILD_SCRIPT)
set(${PROJECT_NAME}_SOURCES
......@@ -83,7 +82,6 @@ if(DTK_BUILD_SCRIPT)
dtkInterpreter.cpp)
endif(DTK_BUILD_SCRIPT)
if(APPLE)
set(${PROJECT_NAME}_SOURCES
${${PROJECT_NAME}_SOURCES}
......@@ -133,6 +131,8 @@ target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
## Target properties
## #################################################################
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
......@@ -141,8 +141,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTA
## Export header file
## #################################################################
generate_export_header(${PROJECT_NAME}
EXPORT_FILE_NAME "${PROJECT_NAME}Export.h")
generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME "${PROJECT_NAME}Export.h")
add_custom_command(TARGET ${PROJECT_NAME} PRE_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different "${${PROJECT_NAME}_BINARY_DIR}/${PROJECT_NAME}Export.h" "${CMAKE_BINARY_DIR}"
......
......@@ -40,8 +40,7 @@ set(${PROJECT_NAME}_SOURCES
add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS}
)
${${PROJECT_NAME}_HEADERS})
target_link_libraries(${PROJECT_NAME} Qt5::Core)
......@@ -49,6 +48,8 @@ target_link_libraries(${PROJECT_NAME} Qt5::Core)
## Target properties
## #################################################################
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
......
......@@ -12,7 +12,6 @@
##
### Code:
project(dtkMath)
## #################################################################
......@@ -54,6 +53,8 @@ add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS})
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
......
......@@ -45,6 +45,8 @@ target_link_libraries(${PROJECT_NAME} Qt5::Core)
## Target properties
## #################################################################
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
......
......@@ -50,6 +50,8 @@ target_link_libraries(${PROJECT_NAME} Qt5::Core)
## Target properties
## ###################################################################
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
......@@ -60,8 +62,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${dtk_VERSION}
## Export header file
## #################################################################
generate_export_header(${PROJECT_NAME}
EXPORT_FILE_NAME "${PROJECT_NAME}Export.h")
generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME "${PROJECT_NAME}Export.h")
add_custom_command(TARGET ${PROJECT_NAME} PRE_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different "${${PROJECT_NAME}_BINARY_DIR}/${PROJECT_NAME}Export.h" "${CMAKE_BINARY_DIR}"
......
......@@ -92,6 +92,8 @@ target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
## Target properties
## #################################################################
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
......@@ -100,8 +102,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTA
## Export header file
## #################################################################
generate_export_header(${PROJECT_NAME}
EXPORT_FILE_NAME "${PROJECT_NAME}Export.h")
generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME "${PROJECT_NAME}Export.h")
add_custom_command(TARGET ${PROJECT_NAME} PRE_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different "${${PROJECT_NAME}_BINARY_DIR}/${PROJECT_NAME}Export.h" "${CMAKE_BINARY_DIR}"
......
......@@ -55,8 +55,7 @@ endif(DTK_BUILD_WRAPPERS AND DTK_HAVE_TCL)
add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS}
)
${${PROJECT_NAME}_HEADERS})
target_link_libraries(${PROJECT_NAME} Qt5::Core)
......@@ -80,6 +79,8 @@ endif(DTK_BUILD_WRAPPERS AND DTK_HAVE_PYTHON)
## Target properties
## #################################################################
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
......@@ -90,8 +91,7 @@ set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${dtk_VERSION}
## Export header file
## #################################################################
generate_export_header(${PROJECT_NAME}
EXPORT_FILE_NAME "${PROJECT_NAME}Export.h")
generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME "${PROJECT_NAME}Export.h")
add_custom_command(TARGET ${PROJECT_NAME} PRE_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different "${${PROJECT_NAME}_BINARY_DIR}/${PROJECT_NAME}Export.h" "${CMAKE_BINARY_DIR}"
......
......@@ -37,7 +37,6 @@ set(${PROJECT_NAME}_SOURCES
dtkVrScreen.cpp
dtkVrTracker.cpp)
## #################################################################
## Vrpn sources
## #################################################################
......@@ -77,11 +76,9 @@ endif(DTK_HAVE_NITE)
## Build rules
## #################################################################
add_library(${PROJECT_NAME} SHARED
${${PROJECT_NAME}_SOURCES}
${${PROJECT_NAME}_HEADERS}
)
${${PROJECT_NAME}_HEADERS})
target_link_libraries(${PROJECT_NAME}
dtkMathSupport
......@@ -109,6 +106,8 @@ endif(DTK_HAVE_NITE)
## Target properties
## #################################################################
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
......
......@@ -109,19 +109,19 @@ target_link_libraries(${PROJECT_NAME} Qt5::Widgets)
## Target properties
## ###################################################################
set_target_properties(${PROJECT_NAME} PROPERTIES CXX_VISIBILITY_PRESET hidden)
set_target_properties(${PROJECT_NAME} PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
set_target_properties(${PROJECT_NAME} PROPERTIES MACOSX_RPATH 0)
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}")
set_target_properties(${PROJECT_NAME} PROPERTIES VERSION ${dtk_VERSION}
SOVERSION ${dtk_VERSION_MAJOR})
## #################################################################
## Export header file
## #################################################################
generate_export_header(${PROJECT_NAME}
EXPORT_FILE_NAME "${PROJECT_NAME}Export.h")
generate_export_header(${PROJECT_NAME} EXPORT_FILE_NAME "${PROJECT_NAME}Export.h")
add_custom_command(TARGET ${PROJECT_NAME} PRE_BUILD
COMMAND ${CMAKE_COMMAND} ARGS -E copy_if_different "${${PROJECT_NAME}_BINARY_DIR}/${PROJECT_NAME}Export.h" "${CMAKE_BINARY_DIR}"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment