Commit 716a8b8f authored by Ben Boeckel's avatar Ben Boeckel Committed by David Thompson
Browse files

osx: set the INSTALL_NAME_DIR property on all smtk libraries

The plugins and Python libraries were not getting this set properly.
Instead of setting the property manually on all of the targets, set the
default value using the CMAKE_INSTALL_NAME_DIR variable.
parent 2dda14fb
......@@ -445,6 +445,11 @@ endif()
# Finally build smtk
################################################################################
# On Mac OS X, set the dir. included as part of the installed library's path:
if (BUILD_SHARED_LIBS)
set(CMAKE_INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif ()
add_subdirectory(smtk)
################################################################################
......
......@@ -72,12 +72,6 @@ if (APPLE)
mark_as_advanced(SMTK_MACOS_FOUNDATION_FMWK)
endif()
# On Mac OS X, set the dir. included as part of the installed library's path:
if (BUILD_SHARED_LIBS)
set_target_properties(smtkCore
PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()
#install the library and exports the library when used from a build tree
smtk_install_library(smtkCore)
......
......@@ -79,11 +79,6 @@ smtk_export_header(smtkCGMSession Exports.h)
set_property(TARGET smtkCGMSession APPEND PROPERTY COMPILE_FLAGS ${CGM_DEFINES})
set_property(TARGET smtkCGMSession APPEND PROPERTY INCLUDE_DIRECTORIES ${CGM_INCLUDE_DIRS})
# On Mac OS X, set the directory included as part of the installed library's path:
if (BUILD_SHARED_LIBS)
set_target_properties(smtkCGMSession PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()
#install the library and exports the library when used from a build tree
smtk_install_library(smtkCGMSession)
......
......@@ -235,11 +235,6 @@ endif ()
smtk_export_header(smtkDiscreteSession Exports.h)
# On Mac OS X, set the directory included as part of the installed library's path:
if (BUILD_SHARED_LIBS)
set_target_properties(smtkDiscreteSession PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()
# Install the headers.
smtk_public_headers(${discreteSessionHeaders} ${DiscreteModelHeaders})
......
......@@ -51,11 +51,6 @@ if(SMTK_ENABLE_REMUS_SUPPORT)
endif()
# On Mac OS X, set the directory included as part of the installed library's path:
if (BUILD_SHARED_LIBS)
set_target_properties(${vtk-module} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()
# Link GDAL and Add a compiler definition to the target
if(GDAL_FOUND)
target_link_libraries(${vtk-module} LINK_PRIVATE ${GDAL_LIBRARY} )
......
......@@ -76,11 +76,6 @@ if(SMTK_ENABLE_REMUS_SUPPORT)
endif()
# On Mac OS X, set the directory included as part of the installed library's path:
if (BUILD_SHARED_LIBS)
set_target_properties(${vtk-module} PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()
# Link GDAL and Add a compiler definition to the target
if(GDAL_FOUND)
target_link_libraries(${vtk-module} LINK_PRIVATE ${GDAL_LIBRARY} )
......
......@@ -243,11 +243,6 @@ target_include_directories(${vtk-module}
target_link_libraries(vtkSMTKDiscreteModel LINK_PRIVATE ${UUID_LIBS})
# On Mac OS X, set the directory included as part of the installed library's path:
if (BUILD_SHARED_LIBS)
set_target_properties(vtkSMTKDiscreteModel PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()
# install the headers
smtk_public_headers(${DiscreteModelHeaders})
......
......@@ -41,11 +41,6 @@ target_link_libraries(vtkDiscreteMoabReader
smtk_export_header(vtkDiscreteMoabReader discreteMoabExports.h)
# On Mac OS X, set the directory included as part of the installed library's path:
if (BUILD_SHARED_LIBS)
set_target_properties(vtkDiscreteMoabReader PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()
# Install the headers.
smtk_public_headers(vtkCmbMoabReader.h)
......
......@@ -48,11 +48,6 @@ smtk_export_header(smtkExodusSession Exports.h)
#set_property(TARGET smtkExodusSession APPEND PROPERTY COMPILE_FLAGS ${EXODUS_DEFINES})
#set_property(TARGET smtkExodusSession APPEND PROPERTY INCLUDE_DIRECTORIES ${EXODUS_INCLUDE_DIRS})
# On Mac OS X, set the directory included as part of the installed library's path:
if (BUILD_SHARED_LIBS)
set_target_properties(smtkExodusSession PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()
#install the library and exports the library when used from a build tree
smtk_install_library(smtkExodusSession)
......
......@@ -38,11 +38,6 @@ target_link_libraries(smtkPolygonSession
)
smtk_export_header(smtkPolygonSession Exports.h)
# On Mac OS X, set the directory included as part of the installed library's path:
if (BUILD_SHARED_LIBS)
set_target_properties(smtkPolygonSession PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()
# Install the library and exports the library when used from a build tree
smtk_install_library(smtkPolygonSession)
# Install the headers
......
......@@ -38,11 +38,6 @@ endif()
smtk_export_header(smtkRemoteSession Exports.h)
# On Mac OS X, set the directory included as part of the installed library's path:
if (BUILD_SHARED_LIBS)
set_target_properties(smtkRemoteSession PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()
#install the library and exports the library when used from a build tree
smtk_install_library(smtkRemoteSession)
......
......@@ -107,12 +107,6 @@ add_library(smtkQtExt
${RCS_RESOURCES}
)
# On Mac OS X, set the directory included as part of the installed library's path:
set_target_properties(smtkQtExt
PROPERTIES
INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib"
)
#we need to add the location of the moc files to the include dir for qtsmtk
target_include_directories(smtkQtExt PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
......
......@@ -15,11 +15,6 @@ smtk_export_header(smtkRemusExt smtkRemusExtExports.h)
smtk_public_headers(${remusExtHeaders})
smtk_install_library(smtkRemusExt)
# On Mac OS X, set the directory included as part of the installed library's path:
if (BUILD_SHARED_LIBS)
set_target_properties(smtkRemusExt PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()
if (SMTK_ENABLE_PYTHON_WRAPPING)
add_library(smtkRemusExtPy MODULE smtkRemusExtPy.cxx)
target_include_directories(smtkRemusExtPy PRIVATE ${PYTHON_INCLUDE_DIRS})
......
......@@ -40,11 +40,6 @@ target_include_directories(vtkSMTKExt
${CMAKE_CURRENT_BINARY_DIR}
)
# On Mac OS X, set the directory included as part of the installed library's path:
if (BUILD_SHARED_LIBS)
set_target_properties(vtkSMTKExt PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()
# Link *everything* in this directory to VTK modules
# This is required for the TestBuild targets.
# We must test whether each of the targets below exist
......
......@@ -19,11 +19,6 @@ target_include_directories(vtkToSMTKMesh
target_include_directories(vtkToSMTKMesh
PRIVATE ${MOAB_INCLUDE_DIRS})
# On Mac OS X, set the directory included as part of the installed library's path:
if (BUILD_SHARED_LIBS)
set_target_properties(vtkToSMTKMesh PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
endif()
#install the headers
smtk_public_headers(${vtkToMeshHeaders})
# ... and make header compilation tests link properly:
......
Supports Markdown
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