Commit 5d787001 authored by T.J. Corona's avatar T.J. Corona

Changes to make SMTK work as a CMB thirdparty project.

This MR replaces CMAKE_PROJECT_NAME with PROJECT_NAME within SMTK so SMTK
will build and install as a third party submodule of CMB. Also, the
"subproject" delineation was removed from cJSON (which will soon be removed
entirely), SMTKVTKExtensionMeshing, and SMTKDiscreteModel. Finally, the
header test macro has been modified to accept as input the library
associated with the header files.
parent 98df6594
......@@ -10,7 +10,7 @@ include(GenerateExportHeader)
# Utility to build a kit name from the current directory.
function(smtk_get_kit_name kitvar)
string(REPLACE "${${CMAKE_PROJECT_NAME}_SOURCE_DIR}/" "" dir_prefix ${CMAKE_CURRENT_SOURCE_DIR})
string(REPLACE "${${PROJECT_NAME}_SOURCE_DIR}/" "" dir_prefix ${CMAKE_CURRENT_SOURCE_DIR})
string(REPLACE "/" "_" kit "${dir_prefix}")
set(${kitvar} "${kit}" PARENT_SCOPE)
# Optional second argument to get dir_prefix.
......@@ -39,7 +39,7 @@ endfunction(smtk_header_test_cxx_name header_name)
# Builds a source file and an executable that does nothing other than
# compile the given header files.
function(smtk_add_header_test name dir_prefix)
function(smtk_add_header_test name dir_prefix lib)
set(hfiles ${ARGN})
set(cxxfiles)
foreach (header ${ARGN})
......@@ -47,7 +47,7 @@ function(smtk_add_header_test name dir_prefix)
get_filename_component(headername ${header} NAME_WE)
smtk_header_test_cxx_name(${name} ${headername} src)
# set(src ${CMAKE_CURRENT_BINARY_DIR}/TestBuild_${name}_${headername}${suffix})
configure_file(${${CMAKE_PROJECT_NAME}_SOURCE_DIR}/CMake/TestBuild.cxx.in ${src} @ONLY)
configure_file(${smtk_cmake_dir}/TestBuild.cxx.in ${src} @ONLY)
set(cxxfiles ${cxxfiles} ${src})
endforeach (header)
......@@ -60,9 +60,9 @@ function(smtk_add_header_test name dir_prefix)
#include the build directory for the export header
target_include_directories(TestBuild_${name}
PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
#also link against moab so we build properly
#also link against the associated library so we build properly
target_link_libraries(TestBuild_${name}
PRIVATE MOAB)
PRIVATE ${lib})
endfunction(smtk_add_header_test)
......@@ -70,7 +70,7 @@ endfunction(smtk_add_header_test)
# Declare a list of header files. Will make sure the header files get
# compiled and show up in an IDE. Also makes sure we install the headers
# into the include folder
function(smtk_public_headers)
function(smtk_public_headers lib)
smtk_get_kit_name(name dir_prefix)
foreach (header IN LISTS ARGN)
if (IS_ABSOLUTE "${header}")
......@@ -87,10 +87,10 @@ function(smtk_public_headers)
else ()
set(suffix "")
endif ()
install (FILES ${header} DESTINATION include/${CMAKE_PROJECT_NAME}/${PROJECT_VERSION}/${dir_prefix}${suffix})
install (FILES ${header} DESTINATION include/${PROJECT_NAME}/${PROJECT_VERSION}/${dir_prefix}${suffix})
endforeach ()
if (BUILD_TESTING)
smtk_add_header_test("${name}" "${dir_prefix}" ${ARGN})
smtk_add_header_test("${name}" "${dir_prefix}" "${lib}" ${ARGN})
endif()
endfunction(smtk_public_headers)
......@@ -110,19 +110,19 @@ endfunction(smtk_private_headers)
function(smtk_install_library target)
set_target_properties(${target} PROPERTIES CXX_VISIBILITY_PRESET hidden)
install(TARGETS ${target}
EXPORT ${CMAKE_PROJECT_NAME}
EXPORT ${PROJECT_NAME}
RUNTIME DESTINATION bin
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
)
export(TARGETS ${target} APPEND FILE ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}Targets.cmake)
export(TARGETS ${target} APPEND FILE ${CMAKE_BINARY_DIR}/${PROJECT_NAME}Targets.cmake)
endfunction(smtk_install_library)
#generate an export header and create an install target for it
function(smtk_export_header target file)
smtk_get_kit_name(name dir_prefix)
generate_export_header(${target} EXPORT_FILE_NAME ${file})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${file} DESTINATION include/${CMAKE_PROJECT_NAME}/${PROJECT_VERSION}/${dir_prefix})
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${file} DESTINATION include/${PROJECT_NAME}/${PROJECT_VERSION}/${dir_prefix})
endfunction(smtk_export_header)
# Builds a source file and an executable that does nothing other than
......
......@@ -551,8 +551,8 @@ configure_file(
${PROJECT_BINARY_DIR}/smtk/Function.h
@ONLY)
install (FILES ${PROJECT_BINARY_DIR}/${CMAKE_PROJECT_NAME}/Function.h
DESTINATION include/${CMAKE_PROJECT_NAME}/${PROJECT_VERSION}/smtk)
install (FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}/Function.h
DESTINATION include/${PROJECT_NAME}/${PROJECT_VERSION}/smtk)
################################################################################
# Determine hash<X> specialization
......@@ -563,11 +563,11 @@ if (NOT SMTK_HASH_H)
endif ()
configure_file(
${PROJECT_SOURCE_DIR}/CMake/HashFunctor.h.in
${PROJECT_BINARY_DIR}/${CMAKE_PROJECT_NAME}/HashFunctor.h
${PROJECT_BINARY_DIR}/${PROJECT_NAME}/HashFunctor.h
@ONLY)
install (FILES ${PROJECT_BINARY_DIR}/${CMAKE_PROJECT_NAME}/HashFunctor.h
DESTINATION include/${CMAKE_PROJECT_NAME}/${PROJECT_VERSION}/smtk)
install (FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}/HashFunctor.h
DESTINATION include/${PROJECT_NAME}/${PROJECT_VERSION}/smtk)
find_file(CGM_HAVE_VERSION_H
NAMES cgm_version.h
......@@ -579,11 +579,11 @@ find_file(CGM_HAVE_VERSION_H
################################################################################
configure_file(
${PROJECT_SOURCE_DIR}/CMake/Options.h.in
${PROJECT_BINARY_DIR}/${CMAKE_PROJECT_NAME}/Options.h
${PROJECT_BINARY_DIR}/${PROJECT_NAME}/Options.h
@ONLY)
install (FILES ${PROJECT_BINARY_DIR}/${CMAKE_PROJECT_NAME}/Options.h
DESTINATION include/${CMAKE_PROJECT_NAME}/${PROJECT_VERSION}/smtk)
install (FILES ${PROJECT_BINARY_DIR}/${PROJECT_NAME}/Options.h
DESTINATION include/${PROJECT_NAME}/${PROJECT_VERSION}/smtk)
################################################################################
......@@ -599,7 +599,7 @@ install(
${PROJECT_SOURCE_DIR}/CMake/SMTKPluginMacros.cmake
${PROJECT_SOURCE_DIR}/CMake/serverSource.cxx.in
DESTINATION
${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME}/${PROJECT_VERSION}
${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/${PROJECT_VERSION}
)
################################################################################
......@@ -643,12 +643,12 @@ endif()
#
# Setup the exports for the library when used from an installed location
install(
EXPORT ${CMAKE_PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME}/${PROJECT_VERSION}
FILE ${CMAKE_PROJECT_NAME}Targets.cmake
EXPORT ${PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/${PROJECT_VERSION}
FILE ${PROJECT_NAME}Targets.cmake
)
export(EXPORT ${CMAKE_PROJECT_NAME} FILE "${PROJECT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Targets.cmake")
export(EXPORT ${PROJECT_NAME} FILE "${PROJECT_BINARY_DIR}/${PROJECT_NAME}Targets.cmake")
################################################################################
# Create a build directory package configuration file
......@@ -659,18 +659,18 @@ export(EXPORT ${CMAKE_PROJECT_NAME} FILE "${PROJECT_BINARY_DIR}/${CMAKE_PROJECT_
#
# Required to happen before we include the docs directory
set(MOAB_ROOT_DIR "${MOAB_ROOT_DIR}")
set(SMTK_VTK_MODULE_DIR "${CMAKE_BINARY_DIR}/lib/cmake/${CMAKE_PROJECT_NAME}/${PROJECT_VERSION}")
set(SMTK_VTK_MODULE_DIR "${CMAKE_BINARY_DIR}/lib/cmake/${PROJECT_NAME}/${PROJECT_VERSION}")
set(SMTK_MODULE_DIR "${PROJECT_SOURCE_DIR}/CMake")
set(SMTK_CONFIG_DIR "${PROJECT_BINARY_DIR}")
configure_file(
${PROJECT_SOURCE_DIR}/CMake/${CMAKE_PROJECT_NAME}Config.cmake.in
${PROJECT_BINARY_DIR}/${CMAKE_PROJECT_NAME}Config.cmake
${PROJECT_SOURCE_DIR}/CMake/${PROJECT_NAME}Config.cmake.in
${PROJECT_BINARY_DIR}/${PROJECT_NAME}Config.cmake
@ONLY)
install(
EXPORT ${CMAKE_PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME}/${PROJECT_VERSION}
FILE ${CMAKE_PROJECT_NAME}Targets.cmake
EXPORT ${PROJECT_NAME}
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/${PROJECT_VERSION}
FILE ${PROJECT_NAME}Targets.cmake
)
################################################################################
......@@ -683,12 +683,12 @@ set(SMTK_VTK_MODULE_DIR "\${CMAKE_CURRENT_LIST_DIR}")
set(SMTK_MODULE_DIR "\${CMAKE_CURRENT_LIST_DIR}")
set(SMTK_CONFIG_DIR "\${CMAKE_CURRENT_LIST_DIR}")
configure_file(
${PROJECT_SOURCE_DIR}/CMake/${CMAKE_PROJECT_NAME}Config.cmake.in
${PROJECT_BINARY_DIR}/CMakeFiles/${CMAKE_PROJECT_NAME}Config.cmake
${PROJECT_SOURCE_DIR}/CMake/${PROJECT_NAME}Config.cmake.in
${PROJECT_BINARY_DIR}/CMakeFiles/${PROJECT_NAME}Config.cmake
@ONLY)
install (FILES ${PROJECT_BINARY_DIR}/CMakeFiles/${CMAKE_PROJECT_NAME}Config.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${CMAKE_PROJECT_NAME}/${PROJECT_VERSION})
install (FILES ${PROJECT_BINARY_DIR}/CMakeFiles/${PROJECT_NAME}Config.cmake
DESTINATION ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}/${PROJECT_VERSION})
################################################################################
# Build documentation
......
## Support for SMTK as a third party submodule
This change replaces CMAKE_PROJECT_NAME with PROJECT_NAME within SMTK so
SMTK will build and install as a third party submodule of CMB. Also,
the "subproject" delineation was removed from cJSON (which will soon
be removed entirely), SMTKVTKExtensionMeshing, and
SMTKDiscreteModel. Finally, the header test macro has been modified to
accept as input the library associated with the header files.
......@@ -171,7 +171,7 @@ set(attributeSrcs
)
#install the headers
smtk_public_headers(${attributeHeaders})
smtk_public_headers(smtkCore ${attributeHeaders})
if (SMTK_ENABLE_PARAVIEW_SUPPORT)
add_smtk_plugin(
......@@ -188,6 +188,4 @@ endif()
if(SMTK_ENABLE_TESTING)
add_subdirectory(testing)
target_link_libraries(TestBuild_smtk_attribute
PUBLIC nlohmann_json)
endif(SMTK_ENABLE_TESTING)
......@@ -75,11 +75,8 @@ if (SMTK_ENABLE_PYTHON_WRAPPING)
endif()
#install the headers
smtk_public_headers(${commonHeaders})
smtk_public_headers(smtkCore ${commonHeaders})
if (SMTK_ENABLE_TESTING)
add_subdirectory(testing)
target_link_libraries(TestBuild_smtk_common
PUBLIC
nlohmann_json)
endif()
smtk_public_headers(helpers.h)
smtk_public_headers(smtkCore helpers.h)
set(commonTests
unitExtension
......
......@@ -64,7 +64,7 @@ if (SMTK_ENABLE_VTK_SUPPORT)
# The pv_process_modules() macro finds all subdirectories
# containing a module.cmake file automatically.
include (smtkVTKModules)
vtk_smtk_setup_module_environment(${CMAKE_PROJECT_NAME} ${PROJECT_VERSION})
vtk_smtk_setup_module_environment(${PROJECT_NAME} ${PROJECT_VERSION})
vtk_smtk_process_modules()
set(SMTK_VTK_SUPPORT_ENABLED "True")
......
......@@ -80,7 +80,7 @@ set(hdrs
job.h
logindialog.h
)
smtk_public_headers(${hdrs})
smtk_public_headers(smtkCumulusExt ${hdrs})
#we need to add the location of the moc files to the include dir
target_include_directories(smtkCumulusExt PRIVATE ${CMAKE_CURRENT_BINARY_DIR})
......@@ -150,8 +150,3 @@ if(SMTK_ENABLE_PARAVIEW_SUPPORT)
smtk_install_library(smtkPQCumulusJobsPlugin)
endif()
if (SMTK_ENABLE_TESTING)
# Make header compilation tests link properly:
target_link_libraries(TestBuild_smtk_extension_cumulus LINK_PRIVATE smtkCumulusExt)
endif()
......@@ -25,7 +25,7 @@ target_link_libraries(smtkDelaunayExt
)
smtk_export_header(smtkDelaunayExt Exports.h)
smtk_public_headers(${headers})
smtk_public_headers(smtkDelaunayExt ${headers})
smtk_install_library(smtkDelaunayExt)
add_subdirectory(plugin)
......
......@@ -47,7 +47,7 @@ target_link_libraries(smtkMatplotlibExt
)
smtk_export_header(smtkMatplotlibExt Exports.h)
smtk_public_headers(${headers})
smtk_public_headers(smtkMatplotlibExt ${headers})
smtk_install_library(smtkMatplotlibExt)
if (SMTK_ENABLE_PARAVIEW_SUPPORT)
......
......@@ -21,7 +21,7 @@ if(SMTK_ENABLE_POLYGON_SESSION)
# The vtk_smtk_process_modules() macro finds all subdirectories
# containing a module.cmake file automatically.
include (smtkVTKModules)
vtk_smtk_setup_module_environment(${CMAKE_PROJECT_NAME} ${PROJECT_VERSION})
vtk_smtk_setup_module_environment(${PROJECT_NAME} ${PROJECT_VERSION})
list(APPEND import_vtk_depends
vtkCommonCore
......@@ -64,7 +64,7 @@ if(SMTK_ENABLE_POLYGON_SESSION)
# Install the library and exports the library when used from a build tree
smtk_install_library(smtkOpenCVExt)
# Install the headers
smtk_public_headers(${opencvHeaders})
smtk_public_headers(smtkOpenCVExt ${opencvHeaders})
if(SMTK_ENABLE_PARAVIEW_SUPPORT)
add_subdirectory(qt)
......
......@@ -8,7 +8,7 @@ set(OpenCVOperationsSrcs imageFeatureExtractorWidget.cxx)
set(OpenCVOperationsUI imageFeatureExtractor.ui)
#install the headers
smtk_public_headers(${OpenCVOperationsHeaders})
smtk_public_headers(smtkOpenCVQtExt ${OpenCVOperationsHeaders})
qt5_wrap_cpp(MOC_BUILT_SOURCES ${OpenCVOperationsHeaders})
qt5_wrap_ui(UI_BUILT_SOURCES ${OpenCVOperationsUI})
......@@ -64,7 +64,4 @@ if (SMTK_ENABLE_TESTING)
list(APPEND SMTK_VTK_TARGET_LIST ${target})
endif()
endforeach()
target_link_libraries(TestBuild_smtk_extension_opencv_qt PUBLIC ${SMTK_VTK_TARGET_LIST}
smtkQtExt)
endif()
......@@ -36,9 +36,4 @@ if (SMTK_ENABLE_PARAVIEW_SUPPORT)
smtk_install_library(${vtk-module}CS)
endif ()
smtk_public_headers(${headers})
if (SMTK_ENABLE_TESTING)
# ... and make header compilation tests link properly:
target_link_libraries(TestBuild_smtk_extension_opencv_vtk LINK_PRIVATE vtkCommonCore)
endif()
smtk_public_headers(${vtk-module} ${headers})
......@@ -73,6 +73,7 @@ set(PQComponentsResources
#install the headers
smtk_public_headers(
smtkPQComponentsExt
${PQComponentsHeaders}
${PQComponentsUnwrappedHdrs}
)
......@@ -110,13 +111,6 @@ target_link_libraries(smtkPQComponentsExt LINK_PUBLIC
Qt5::Core
)
if (SMTK_ENABLE_TESTING)
target_link_libraries(TestBuild_smtk_extension_paraview_appcomponents
LINK_PUBLIC
smtkPQComponentsExt
)
endif()
smtk_export_header(smtkPQComponentsExt Exports.h)
set(PQComponentsPluginHdrs
......
......@@ -28,7 +28,7 @@ set(qtui
)
#install the headers
smtk_public_headers(${hdrs} ${unwrappedHdrs})
smtk_public_headers(smtkPQOperationViewsExt ${hdrs} ${unwrappedHdrs})
qt5_wrap_cpp(mocs ${hdrs})
qt5_wrap_ui(uisrc ${qtui})
......@@ -58,13 +58,6 @@ target_link_libraries(smtkPQOperationViewsExt
vtkjsoncpp
)
if (SMTK_ENABLE_TESTING)
target_link_libraries(TestBuild_smtk_extension_paraview_operators
LINK_PUBLIC
smtkPQOperationViewsExt
)
endif()
smtk_export_header(smtkPQOperationViewsExt Exports.h)
# Generate the ParaView plugin code for each view class
......
......@@ -28,7 +28,7 @@ smtk_install_library(smtkPluginSupport)
smtk_export_header(smtkPluginSupport Exports.h)
smtk_public_headers(${hdrs})
smtk_public_headers(smtkPluginSupport ${hdrs})
if (SMTK_ENABLE_PYTHON_WRAPPING)
add_subdirectory(pybind11)
......
......@@ -96,16 +96,6 @@ smtk_export_header(smtkPVServerExt Exports.h)
smtk_install_library(smtkPVServerExt)
smtk_install_library(smtkPVServerExtPlugin)
# Install the headers
smtk_public_headers(${hdrs})
if (SMTK_ENABLE_TESTING)
target_link_libraries(TestBuild_smtk_extension_paraview_server
PUBLIC
smtkPVServerExt
smtkPVServerExtPlugin
INTERFACE
nlohmann_json
)
endif()
smtk_public_headers(smtkPVServerExt ${hdrs})
add_subdirectory(testing)
......@@ -26,7 +26,7 @@ set(PQWidgetsHeaders
)
#install the headers
smtk_public_headers(${PQWidgetsHeaders})
smtk_public_headers(smtkPQWidgetsExt ${PQWidgetsHeaders})
qt5_wrap_cpp(MOC_BUILT_SOURCES ${PQWidgetsMocHeaders})
qt5_wrap_ui(UI_BUILT_SOURCES ${PQWidgetsUIs})
......@@ -55,12 +55,6 @@ target_link_libraries(smtkPQWidgetsExt LINK_PUBLIC
Qt5::Widgets
)
if (SMTK_ENABLE_TESTING)
target_link_libraries(TestBuild_smtk_extension_paraview_widgets LINK_PUBLIC
smtkPQWidgetsExt
)
endif()
smtk_export_header(smtkPQWidgetsExt Exports.h)
#install the library and exports the library when used from a build tree
......
......@@ -124,7 +124,7 @@ set(QAttrLibHeaders
)
#install the headers
smtk_public_headers(${QAttrLibHeaders})
smtk_public_headers(smtkQtExt ${QAttrLibHeaders})
qt5_wrap_cpp(MOC_BUILT_SOURCES ${QAttrLibMocHeaders})
qt5_wrap_ui(SMTKQTEXT_UI_BUILT_SOURCES ${QAttrLibUIs})
......@@ -158,11 +158,6 @@ smtk_export_header(smtkQtExt Exports.h)
#install the library and exports the library when used from a build tree
smtk_install_library(smtkQtExt)
if (SMTK_ENABLE_TESTING)
# ... and make header compilation tests link properly:
target_link_libraries(TestBuild_smtk_extension_qt LINK_PRIVATE smtkQtExt)
endif()
if (SMTK_ENABLE_EXAMPLES)
add_subdirectory(examples)
endif()
......
......@@ -20,7 +20,7 @@ target_link_libraries(smtkRemusExt
target_include_directories(smtkRemusExt PRIVATE ${REMUS_INCLUDE_DIRS})
smtk_export_header(smtkRemusExt smtkRemusExtExports.h)
smtk_public_headers(${remusExtHeaders})
smtk_public_headers(smtkRemusExt ${remusExtHeaders})
smtk_install_library(smtkRemusExt)
if (SMTK_ENABLE_PYTHON_WRAPPING)
......
......@@ -65,9 +65,4 @@ endif ()
if(SMTK_ENABLE_OPENCV)
target_link_libraries(${vtk-module} LINK_PRIVATE vtkIOImage ${OpenCV_LIBS})
endif()
smtk_public_headers(${headers})
if (SMTK_ENABLE_TESTING)
# ... and make header compilation tests link properly:
target_link_libraries(TestBuild_smtk_extension_vtk_filter LINK_PRIVATE vtkCommonCore)
endif()
smtk_public_headers(${vtk-module} ${headers})
......@@ -34,7 +34,7 @@ target_include_directories(smtkIOVTK
PRIVATE ${MOAB_INCLUDE_DIRS})
#install the headers
smtk_public_headers(${headers})
smtk_public_headers(smtkIOVTK ${headers})
# ... and make header compilation tests link properly:
smtk_install_library(smtkIOVTK)
......
PROJECT(SMTKVTKExtensionMeshing VERSION ${SMTK_VERSION})
set(srcs
cmbUniquePointSet.cxx
cmbFaceMesherInterface.cxx
......@@ -64,9 +62,4 @@ if (SMTK_ENABLE_PARAVIEW_SUPPORT)
smtk_install_library(${vtk-module}CS)
endif ()
smtk_public_headers(${headers})
if (SMTK_ENABLE_TESTING)
# ... and make header compilation tests link properly:
target_link_libraries(TestBuild_smtk_extension_vtk_meshing LINK_PRIVATE vtkCommonCore)
endif()
smtk_public_headers(${vtk-module} ${headers})
......@@ -41,7 +41,7 @@ if (SMTK_ENABLE_PARAVIEW_SUPPORT)
endif ()
add_subdirectory(plugin)
smtk_public_headers(${headers})
smtk_public_headers(${vtk-module} ${headers})
if (SMTK_ENABLE_TESTING)
add_subdirectory(testing)
......
......@@ -93,10 +93,8 @@ if (SMTK_ENABLE_PARAVIEW_SUPPORT)
smtk_install_library(${vtk-module}CS)
endif ()
smtk_public_headers(${headers})
smtk_public_headers(${vtk-module} ${headers})
if (SMTK_ENABLE_TESTING)
# ... and make header compilation tests link properly:
target_link_libraries(TestBuild_smtk_extension_vtk_reader LINK_PRIVATE vtkCommonCore)
add_subdirectory(testing)
endif()
......@@ -93,7 +93,7 @@ endforeach()
target_link_libraries(${vtk-module} PUBLIC ${SMTK_VTK_TARGET_LIST})
#install the headers
smtk_public_headers(${VTKLibHeaders})
smtk_public_headers(${vtk-module} ${VTKLibHeaders})
# ... and make header compilation tests link properly:
smtk_install_library(${vtk-module})
......@@ -126,6 +126,5 @@ if (SMTK_ENABLE_PYTHON_WRAPPING)
endif()
if (SMTK_ENABLE_TESTING)
target_link_libraries(TestBuild_smtk_extension_vtk_source PUBLIC ${SMTK_VTK_TARGET_LIST})
add_subdirectory(testing)
endif()
......@@ -34,6 +34,11 @@ target_include_directories(${vtk-module}
$<BUILD_INTERFACE:${smtk_BINARY_DIR}>
$<INSTALL_INTERFACE:include/smtk/${SMTK_VERSION}>)
target_link_libraries(${vtk-module}
LINK_PUBLIC
${__dependencies}
)
#has to be after the vtk_module_library
smtk_export_header(${vtk-module} Exports.h)
......@@ -43,7 +48,7 @@ target_include_directories(${vtk-module}
)
#install the headers
smtk_public_headers(${VTKLibHeaders})
smtk_public_headers(${vtk-module} ${VTKLibHeaders})
# ... and make header compilation tests link properly:
smtk_install_library(${vtk-module})
......@@ -57,8 +62,3 @@ endif ()
#if (SMTK_ENABLE_PYTHON_WRAPPING AND VTK_WRAP_PYTHON)
# vtk_smtk_wrap_module_python3(${vtk-module} "${VTKLibHeaders}")
#endif()
if (SMTK_ENABLE_TESTING)
target_link_libraries(TestBuild_smtk_extension_vtk_widgets PUBLIC ${__dependencies})
# add_subdirectory(testing)
endif()
......@@ -16,7 +16,7 @@ set(qtui
)
#install the headers
smtk_public_headers(${hdrs})
smtk_public_headers(smtkVXLOperationViewsExt ${hdrs})
qt5_wrap_cpp(MOC_BUILT_SOURCES ${hdrs})
qt5_wrap_ui(UI_BUILT_SOURCES ${qtui})
......@@ -48,13 +48,6 @@ target_link_libraries(smtkVXLOperationViewsExt
smtkPQWidgetsExt
)
if (SMTK_ENABLE_TESTING)
target_link_libraries(TestBuild_smtk_extension_vxl_operators
LINK_PUBLIC
smtkVXLOperationViewsExt
)
endif()
smtk_export_header(smtkVXLOperationViewsExt Exports.h)
# Generate the ParaView plugin code for each view class
......
......@@ -16,14 +16,16 @@ set(VTK_INSTALL_NO_HEADERS 1)
vtk_module_library(${vtk-module} ${srcs})
target_include_directories(${vtk-module}
PUBLIC
${VXL_RPL_INCLUDE_DIR}
${VXL_VCL_INCLUDE_DIR}
${VXL_CORE_INCLUDE_DIR}
PRIVATE
$<BUILD_INTERFACE:${smtk_SOURCE_DIR}>
$<BUILD_INTERFACE:${smtk_BINARY_DIR}>
$<INSTALL_INTERFACE:include/smtk/${SMTK_VERSION}>
${VXL_RPL_INCLUDE_DIR}
${VXL_VCL_INCLUDE_DIR}
${VXL_CORE_INCLUDE_DIR}
${Boost_INCLUDE_DIRS}
)
......@@ -32,7 +34,6 @@ target_link_libraries(${vtk-module}
vtkSMTKReaderExt # vtkLIDARReader
vtkSMTKFilterExt
smtkIOVTK # vtkLIDARWriter
LINK_PRIVATE
rtvl
vnl
rgtl
......@@ -51,10 +52,4 @@ if (SMTK_ENABLE_PARAVIEW_SUPPORT)
smtk_install_library(${vtk-module}CS)
endif ()
smtk_public_headers(${headers})
if (SMTK_ENABLE_TESTING)
# ... and make header compilation tests link properly:
target_include_directories(TestBuild_smtk_extension_vxl_vtk PRIVATE ${VXL_RPL_INCLUDE_DIR})
target_link_libraries(TestBuild_smtk_extension_vxl_vtk LINK_PRIVATE vtkCommonCore)
endif()
smtk_public_headers(${vtk-module} ${headers})
......@@ -13,7 +13,7 @@ set(VXLWidgetsUI
)
#install the headers
smtk_public_headers(${VXLWidgetsHeaders})
smtk_public_headers(smtkVXLWidgetsExt ${VXLWidgetsHeaders})
qt5_wrap_cpp(MOC_BUILT_SOURCES ${VXLWidgetsHeaders})
qt5_wrap_ui(UI_BUILT_SOURCES ${VXLWidgetsUI})
......@@ -69,7 +69,4 @@ if (SMTK_ENABLE_TESTING)
list(APPEND SMTK_VTK_TARGET_LIST ${target})
endif()
endforeach()
target_link_libraries(TestBuild_smtk_extension_vxl_widgets PUBLIC ${SMTK_VTK_TARGET_LIST}
smtkQtExt)
endif()
......@@ -52,7 +52,7 @@ list(APPEND ioHeaders
)
#install the headers
smtk_public_headers(${ioHeaders})
smtk_public_headers(smtkCore ${ioHeaders})
if (SMTK_ENABLE_PYTHON_WRAPPING)
add_subdirectory(pybind11)
......@@ -60,7 +60,4 @@ endif()
if (SMTK_ENABLE_TESTING)
add_subdirectory(testing)
target_link_libraries(TestBuild_smtk_io
PUBLIC
nlohmann_json)
endif()
......@@ -124,7 +124,7 @@ smtk_operation_xml("${CMAKE_CURRENT_SOURCE_DIR}/operators/UndoElevateMesh.sbt" d
smtk_operation_xml("${CMAKE_CURRENT_SOURCE_DIR}/operators/WriteMesh.sbt" defOpXML)
#install the headers
smtk_public_headers(${meshHeaders})
smtk_public_headers(smtkCore ${meshHeaders})
if (SMTK_ENABLE_PARAVIEW_SUPPORT)
add_smtk_plugin(
......@@ -141,8 +141,5 @@ if (SMTK_ENABLE_PYTHON_WRAPPING)
endif()
if(SMTK_ENABLE_TESTING)
target_link_libraries(TestBuild_smtk_mesh
PUBLIC
nlohmann_json)
add_subdirectory(testing)
endif()
......@@ -115,7 +115,7 @@ foreach (operator ${modelOps})
endforeach()
#install the headers
smtk_public_headers(${modelHeaders})
smtk_public_headers(smtkCore ${modelHeaders})
if (SMTK_ENABLE_PARAVIEW_SUPPORT)
add_smtk_plugin(
......@@ -131,8 +131,5 @@ if (SMTK_ENABLE_PYTHON_WRAPPING)
endif()
if (SMTK_ENABLE_TESTING)
target_link_libraries(TestBuild_smtk_model
PUBLIC
nlohmann_json)
add_subdirectory(testing)
endif()
......@@ -2,7 +2,7 @@
# Make a library of some utility functions for tests to use:
################################################################################
add_library(smtkCoreModelTesting STATIC helpers.cxx)
smtk_public_headers(helpers.h)
smtk_public_headers(smtkCoreModelTesting helpers.h)
target_link_libraries(smtkCoreModelTesting LINK_PRIVATE smtkCore)
smtk_install_library(smtkCoreModelTesting)
......
......@@ -70,7 +70,7 @@ if (SMTK_ENABLE_PYTHON_WRAPPING)
endif()
#install the headers
smtk_public_headers(${operationHeaders})
smtk_public_headers(smtkCore ${operationHeaders})
#also install the xml files
install(
......@@ -88,7 +88,5 @@ if (SMTK_ENABLE_PARAVIEW_SUPPORT)
endif()