Commit eaf24846 authored by David Thompson's avatar David Thompson

Progress on #85 (consistent target + option names).

This patch includes the following changes:

+ Eliminate a shiboken warning (do not wrap cJSON methods).
+ Fix a stupid mistake causing a warning in ExportJSON.
+ A scripted rename. Ran this command:

      find smtk/bridge -type f -exec vim -S /path/to/vscr {} \;

  where `vscr` contained

      %s/SMTKSessionExodusExports/Exports/g
      %s/SMTKSessionExodus/smtkExodusSession/g
      %s/SMTKSESSIONEXODUS_EXPORT/SMTKEXODUSSESSION_EXPORT/g
      %s/discreteSessionExports/Exports/g
      %s/SMTKRemoteExports/Exports/g
      %s/SMTKRemote/smtkRemoteSession/g
      %s/SMTKREMOTE_EXPORT/SMTKREMOTESESSION_EXPORT/g
      wq
+ Another scripted rename:

      find smtk/extension -type f -exec vim -S /path/to/vscr {} \;

  where `vscr` is a vim script containing:

      %s/QtSMTKExports.h/Exports.h/g
      %s/QTSMTK_EXPORT/SMTKQTEXT_EXPORT/g
      %s/vtkSMTKModule/smtkVTKExtModule/g
      %s/vtkSMTKExports/smtkVTKExtExports/g
      %s/VTKSMTK_EXPORT/SMTKVTKEXT_EXPORT/g
      %s/vtkSMTK/smtkVTKExt/g
      wq

+ Add VTK-style Python wrapping to the classes in vtkSMTKExt
  (which cannot be named smtkVTKExt because of VTK's build system).
  This should close #97.
+ Fixes to get things building again.
parent ab56771f
......@@ -12,10 +12,10 @@
// Compile-time options chosen for this build of SMTK.
// Was SMTK built with Qt? If true, QtSMTK library will exist.
// Was SMTK built with Qt? If true, smtkQtExt library will exist.
#cmakedefine SMTK_BUILD_QT
// Was SMTK built with VTK? If true, the vtkSMTK library will exist.
// Was SMTK built with VTK? If true, the smtkVTKExt library will exist.
#cmakedefine SMTK_BUILD_VTK
// Was SMTK built with discrete model? If true, the smtkDiscreteSession library
......@@ -23,7 +23,7 @@
#cmakedefine SMTK_BUILD_DISCRETE_SESSION
// Was SMTK built with exodus-II reader? If true,
// the SMTKSessionExodus library will exist.
// the SMTKExodusSession library will exist.
#cmakedefine SMTK_ENABLE_EXODUS_SESSION
// Was SMTK built with moab reader? If true, the vtkDiscreteMoabReader
......@@ -35,7 +35,7 @@
// Does CGM provide cgm_version.h (true for v14+, false otherwise).
#cmakedefine CGM_HAVE_VERSION_H
// Was SMTK built with Remus? If true, SMTKRemote library will exist.
// Was SMTK built with Remus? If true, smtkRemoteSession library will exist.
#cmakedefine SMTK_ENABLE_REMUS
// Should sparse_hash_map be used (instead of std::map) for primary storage?
......
#ifndef __smtk_common_Version_h
#define __smtk_common_Version_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include <string>
......
......@@ -20,12 +20,12 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
# -- 1 --
# Testing must be enabled to build this tutorial
# because it depends on SMTKCoreModelTesting.
# because it depends on smtkCoreModelTesting.
#if (SMTK_ENABLE_TESTING)
# add_executable(add_a_session add_a_session.cxx)
# target_link_libraries(add_a_session SMTKCore SMTKCoreModelTesting)
# target_link_libraries(add_a_session smtkCore smtkCoreModelTesting)
# if (SMTK_BUILD_CGM)
# target_link_libraries(add_a_session cgmSMTK)
# target_link_libraries(add_a_session smtkCGMSession)
# endif (SMTK_BUILD_CGM)
# add_test(tut-add_a_session ${EXECUTABLE_OUTPUT_PATH}/add_a_session)
#endif()
......@@ -20,12 +20,12 @@ include_directories(${CMAKE_CURRENT_BINARY_DIR})
# -- 1 --
# Testing must be enabled to build this tutorial
# because it depends on SMTKCoreModelTesting.
# because it depends on smtkCoreModelTesting.
if (SMTK_ENABLE_TESTING)
add_executable(implement_an_operator implement_an_operator.cxx)
target_link_libraries(implement_an_operator SMTKCore SMTKCoreModelTesting)
target_link_libraries(implement_an_operator smtkCore smtkCoreModelTesting)
if (SMTK_BUILD_CGM)
target_link_libraries(implement_an_operator cgmSMTK)
target_link_libraries(implement_an_operator smtkCGMSession)
endif (SMTK_BUILD_CGM)
add_test(tut-implement_an_operator ${EXECUTABLE_OUTPUT_PATH}/implement_an_operator)
endif()
......@@ -28,12 +28,12 @@ With that in mind:
* smtk — this directory contains all of the source code for SMTK libraries and tests
* common — source for classes used throughout the SMTKCore library
* attribute — source for :ref:`smtk-attribute-sys` in the SMTKCore library
* model — source for :ref:`smtk-model-sys` in the SMTKCore library
* simulation — aids to exporting simulation input decks in the SMTKCore library
* io — file and string I/O in the SMTKCore library, a mix of XML and JSON
* view — source for providing views of attributes and models in the SMTKCore library
* common — source for classes used throughout the smtkCore library
* attribute — source for :ref:`smtk-attribute-sys` in the smtkCore library
* model — source for :ref:`smtk-model-sys` in the smtkCore library
* simulation — aids to exporting simulation input decks in the smtkCore library
* io — file and string I/O in the smtkCore library, a mix of XML and JSON
* view — source for providing views of attributes and models in the smtkCore library
* session — source for additional libraries that session solid modeling kernels into SMTK
* extensions — source for additional libraries that expose SMTK to other software
......
......@@ -21,15 +21,15 @@ smtk_source_group(view)
set(smtk_headers ${commonHeaders} ${attributeHeaders} ${modelHeaders} ${simulationHeaders} ${ioHeaders} ${viewHeaders})
set(smtk_srcs ${commonSrcs} ${attributeSrcs} ${modelSrcs} ${simulationSrcs} ${ioSrcs} ${viewSrcs})
add_library(SMTKCore ${smtk_srcs})
target_link_libraries(SMTKCore
add_library(smtkCore ${smtk_srcs})
target_link_libraries(smtkCore
LINK_PUBLIC cJSON
LINK_PRIVATE ${Boost_LIBRARIES})
smtk_export_header(SMTKCore SMTKCoreExports.h)
smtk_export_header(smtkCore CoreExports.h)
if (NOT BUILD_SHARED_LIBS AND SMTK_BUILD_PYTHON_WRAPPINGS)
# Set position-independent flag when other project libs are shared.
set_target_properties(SMTKCore PROPERTIES POSITION_INDEPENDENT_CODE True)
set_target_properties(smtkCore PROPERTIES POSITION_INDEPENDENT_CODE True)
endif()
# On Mac OS X, link to the Foundation framework
......@@ -40,18 +40,18 @@ if (APPLE)
PATH_SUFFIXES Frameworks
NO_DEFAULT_PATH)
if (SMTK_MACOS_FOUNDATION_FMWK)
target_link_libraries(SMTKCore
target_link_libraries(smtkCore
LINK_PRIVATE ${SMTK_MACOS_FOUNDATION_FMWK})
endif()
endif()
# On Mac OS X, set the directory 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")
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 DEPENDS cJSON)
smtk_install_library(smtkCore DEPENDS cJSON)
################################################################################
# setup install rules
......@@ -71,7 +71,7 @@ install(EXPORT SMTK-targets DESTINATION lib)
#wrap everything
if(SMTK_BUILD_PYTHON_WRAPPINGS AND Shiboken_FOUND)
sbk_wrap_library(SMTKCore
sbk_wrap_library(smtkCore
GENERATOR_ARGS --avoid-protected-hack
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
LOCAL_INCLUDE_DIRECTORIES
......
......@@ -14,7 +14,7 @@
#ifndef __smtk_attribute_Attribute_h
#define __smtk_attribute_Attribute_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/attribute/ModelEntityItem.h"
......
......@@ -17,7 +17,7 @@
#ifndef __smtk_attribute_Definition_h
#define __smtk_attribute_Definition_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/SharedFromThis.h" // For smtkTypeMacro.
#include "smtk/model/EntityTypeBits.h" // for BitFlags type
......
......@@ -14,7 +14,7 @@
#ifndef __smtk_attribute_DirectoryItem_h
#define __smtk_attribute_DirectoryItem_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/attribute/Item.h"
#include <string>
......
......@@ -14,7 +14,7 @@
#ifndef __smtk_attribute_DirectoryItemDefinition_h
#define __smtk_attribute_DirectoryItemDefinition_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/attribute/ItemDefinition.h"
......
......@@ -15,7 +15,7 @@
#define __smtk_attribute_DoubleItem_h
#include "smtk/attribute/ValueItemTemplate.h"
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
namespace smtk
{
......
......@@ -14,7 +14,7 @@
#ifndef __smtk_attribute_FileItem_h
#define __smtk_attribute_FileItem_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/attribute/Item.h"
#include <string>
......
......@@ -14,7 +14,7 @@
#ifndef __smtk_attribute_FileItemDefinition_h
#define __smtk_attribute_FileItemDefinition_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/attribute/ItemDefinition.h"
......
......@@ -14,7 +14,7 @@
#ifndef __smtk_attribute_GroupItem_h
#define __smtk_attribute_GroupItem_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/attribute/Item.h"
#include <vector>
namespace smtk
......
......@@ -15,7 +15,7 @@
#define __smtk_attribute_IntItem_h
#include "smtk/attribute/ValueItemTemplate.h"
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
namespace smtk
{
......
......@@ -14,7 +14,7 @@
#ifndef __smtk_attribute_Item_h
#define __smtk_attribute_Item_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/SharedFromThis.h"
#include <map>
......
......@@ -17,7 +17,7 @@
#ifndef __smtk_attribute_ItemDefinition_h
#define __smtk_attribute_ItemDefinition_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/SharedFromThis.h" // For smtkTypeMacro.
#include "smtk/attribute/Item.h" // For Item Types.
......
......@@ -10,7 +10,7 @@
#ifndef __smtk_attribute_MeshSelectionItem_h
#define __smtk_attribute_MeshSelectionItem_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/attribute/Item.h"
#include <string>
......
......@@ -14,7 +14,7 @@
#ifndef __smtk_attribute_MeshSelectionItemDefinition_h
#define __smtk_attribute_MeshSelectionItemDefinition_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/attribute/ItemDefinition.h"
......
......@@ -28,7 +28,7 @@
#include "smtk/attribute/Item.h"
#include "smtk/model/EntityRef.h"
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
namespace smtk
{
......
......@@ -14,7 +14,7 @@
#ifndef __smtk_attribute_RefItem_h
#define __smtk_attribute_RefItem_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/attribute/Item.h"
#include <vector>
......
......@@ -14,7 +14,7 @@
#ifndef __smtk_attribute_RefItemDefinition_h
#define __smtk_attribute_RefItemDefinition_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/attribute/ItemDefinition.h"
......
......@@ -10,7 +10,7 @@
#ifndef __smtk_attribute_SearchStyle_h
#define __smtk_attribute_SearchStyle_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
namespace smtk {
namespace attribute {
......
......@@ -15,7 +15,7 @@
#define __smtk_attribute_StringItem_h
#include "smtk/attribute/ValueItemTemplate.h"
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
namespace smtk
{
......
......@@ -18,7 +18,7 @@
#include "smtk/common/UUID.h"
#include "smtk/attribute/ItemDefinition.h"
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include <map>
......
......@@ -17,7 +17,7 @@
#include "smtk/attribute/Item.h"
#include "smtk/attribute/SearchStyle.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
namespace smtk
{
......
......@@ -25,7 +25,7 @@
#include <map>
#include <vector>
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/attribute/ItemDefinition.h"
#include "smtk/PublicPointerDefs.h"
......
......@@ -14,7 +14,7 @@
#ifndef __smtk_attribute_VoidItem_h
#define __smtk_attribute_VoidItem_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/attribute/Item.h"
#include <vector>
......
......@@ -14,7 +14,7 @@
#ifndef __smtk_attribute_VoidItemDefinition_h
#define __smtk_attribute_VoidItemDefinition_h
#include "smtk/SMTKCoreExports.h"
#include "smtk/CoreExports.h"
#include "smtk/PublicPointerDefs.h"
#include "smtk/attribute/ItemDefinition.h"
......
add_executable(attributeReaderTest attributeReaderTest.cxx)
add_executable(basicAttributeTest basicAttributeTest.cxx)
add_executable(basicAttributeDefinitionTest basicAttributeDefinitionTest.cxx)
add_executable(basicAttributeDerivationTest basicAttributeDerivationTest.cxx)
add_executable(basicAttributeXMLWriterTest basicAttributeXMLWriterTest.cxx)
add_executable(childrenItemsTest childrenItemsTest.cxx)
add_executable(expressionTest expressionTest.cxx)
add_executable(expressionTest2 expressionTest2.cxx)
add_executable(attributeAssociationTest attributeAssociationTest.cxx)
add_executable(attributeAutoNamingTest attributeAutoNamingTest.cxx)
add_executable(attributeReferencingTest attributeReferencingTest.cxx)
add_executable(categoryTest categoryTest.cxx)
add_executable(extensibleAttributeTest extensibleAttributeTest.cxx)
target_link_libraries(attributeReaderTest SMTKCore)
target_link_libraries(basicAttributeTest SMTKCore)
target_link_libraries(basicAttributeDefinitionTest SMTKCore)
target_link_libraries(basicAttributeDerivationTest SMTKCore)
target_link_libraries(basicAttributeXMLWriterTest SMTKCore)
target_link_libraries(childrenItemsTest SMTKCore)
target_link_libraries(expressionTest SMTKCore)
target_link_libraries(expressionTest2 SMTKCore)
target_link_libraries(attributeAssociationTest SMTKCore)
target_link_libraries(attributeAutoNamingTest SMTKCore)
target_link_libraries(attributeReferencingTest SMTKCore)
target_link_libraries(categoryTest SMTKCore)
target_link_libraries(extensibleAttributeTest SMTKCore)
add_test(basicAttributeTest ${EXECUTABLE_OUTPUT_PATH}/basicAttributeTest)
add_test(basicAttributeDefinitionTest ${EXECUTABLE_OUTPUT_PATH}/basicAttributeDefinitionTest)
add_test(basicAttributeDerivationTest ${EXECUTABLE_OUTPUT_PATH}/basicAttributeDerivationTest)
add_test(basicAttributeXMLWriterTest
${EXECUTABLE_OUTPUT_PATH}/basicAttributeXMLWriterTest
set(attributeTests
basicAttributeTest
basicAttributeDefinitionTest
basicAttributeDerivationTest
basicAttributeXMLWriterTest
childrenItemsTest
expressionTest
expressionTest2
attributeAssociationTest
attributeAutoNamingTest
attributeReferencingTest
categoryTest
)
set(basicAttributeXMLWriterTest_ARGS
"${CMAKE_BINARY_DIR}/Testing/Temporary/basicAttributeXMLWriterTest.xml"
"${CMAKE_BINARY_DIR}/Testing/Temporary/basicAttributeXMLWriterTest1.xml")
add_test(childrenItemsTest ${EXECUTABLE_OUTPUT_PATH}/childrenItemsTest dummy.sbi)
add_test(expressintTest ${EXECUTABLE_OUTPUT_PATH}/expressionTest)
add_test(expressionTest2 ${EXECUTABLE_OUTPUT_PATH}/expressionTest2)
add_test(attributeAssociationTest ${EXECUTABLE_OUTPUT_PATH}/attributeAssociationTest)
add_test(attributeAutoNamingTest ${EXECUTABLE_OUTPUT_PATH}/attributeAutoNamingTest)
add_test(attributeReferencingTest ${EXECUTABLE_OUTPUT_PATH}/attributeReferencingTest)
add_test(categoryTest ${EXECUTABLE_OUTPUT_PATH}/categoryTest)
set(childrenItemsTest_ARGS "dummy.sbi")
foreach(tst ${attributeTests})
add_executable(${tst} ${tst}.cxx)
target_link_libraries(${tst} smtkCore)
add_test(NAME ${tst} COMMAND ${tst} ${${tst}_ARGS})
endforeach()
################################################################################
# Tests that require SMTK_DATA_DIR
################################################################################
if (SMTK_DATA_DIR AND EXISTS ${SMTK_DATA_DIR}/ReadMe.mkd)
add_test(extensibleAttributeTest
${EXECUTABLE_OUTPUT_PATH}/extensibleAttributeTest
"${SMTK_DATA_DIR}/smtk/attribute/ExtensibleTemplateTest.xml"
"${CMAKE_BINARY_DIR}/Testing/Temporary/ExtensibleTemplateTestResult.xml")
add_test(attributeV1ReaderTest
${EXECUTABLE_OUTPUT_PATH}/attributeReaderTest
"${SMTK_DATA_DIR}/smtk/attribute/HydraTemplateV1.sbt")
set(attributeDataTests
attributeReaderTest
extensibleAttributeTest
)
set(attributeReaderTest_ARGS
"${SMTK_DATA_DIR}/smtk/attribute/HydraTemplateV1.sbt"
)
set(extensibleAttributeTest_ARGS
"${SMTK_DATA_DIR}/smtk/attribute/ExtensibleTemplateTest.xml"
"${CMAKE_BINARY_DIR}/Testing/Temporary/ExtensibleTemplateTestResult.xml"
)
foreach(tst ${attributeDataTests})
add_executable(${tst} ${tst}.cxx)
target_link_libraries(${tst} smtkCore)
add_test(NAME ${tst} COMMAND ${tst} ${${tst}_ARGS})
endforeach()
endif()
......@@ -13,7 +13,7 @@
Manual port of SMTK/smtk/attribute/Testing/atributeAutoNameingTest.cxx
For verifying python-shiboken wrappers
Requires SMTKCorePython.so to be in module path
Requires smtkCorePython.so to be in module path
"""
import smtk
......
......@@ -13,7 +13,7 @@
Manual port of SMTK/smtk/attribute/Testing/attributeReferencingTest.cxx
For verifying python-shiboken wrappers
Requires SMTKCorePython.so to be in module path
Requires smtkCorePython.so to be in module path
"""
import smtk
......
......@@ -13,7 +13,7 @@
Manual port of SMTK/smtk/attribute/Testing/basicAttributeDefinitionTest.cxx
For verifying python-shiboken wrappers
Requires SMTKCorePython.so to be in module path
Requires smtkCorePython.so to be in module path
"""
import smtk
......
......@@ -13,7 +13,7 @@
Manual port of SMTK/smtk/attribute/Testing/basicAttributeDerivationTest.cxx
For verifying python-shiboken wrappers
Requires SMTKCorePython.so to be in module path
Requires smtkCorePython.so to be in module path
"""
import smtk
......
......@@ -13,7 +13,7 @@
Manual port of SMTK/smtk/attribute/Testing/basicAttributeTest.cxx
For verifying python-shiboken wrappers
Requires SMTKCorePython.so to be in module path
Requires smtkCorePython.so to be in module path
"""
import smtk
......
......@@ -13,7 +13,7 @@
Manual port of SMTK/smtk/attribute/Testing/basicAttributeXMLWriterTest.cxx
For verifying python-shiboken wrappers
Requires SMTKCorePython.so to be in module path
Requires smtkCorePython.so to be in module path
"""
import smtk
......
......@@ -13,7 +13,7 @@
Manual port of SMTK/smtk/attribute/Testing/categoryTest.cxx
For verifying python-shiboken wrappers
Requires SMTKCorePython.so to be in module path
Requires smtkCorePython.so to be in module path
"""
import smtk
......
......@@ -13,7 +13,7 @@
Manual port of SMTK/smtk/attribute/Testing/expressionTest.cxx
For verifying python-shiboken wrappers
Requires SMTKCorePython.so to be in module path
Requires smtkCorePython.so to be in module path
"""
import smtk
......
......@@ -13,7 +13,7 @@
Manual port of SMTK/smtk/attribute/Testing/expressionTest.cxx
For verifying python-shiboken wrappers
Requires SMTKCorePython.so to be in module path
Requires smtkCorePython.so to be in module path
"""
import smtk
......
......@@ -11,7 +11,7 @@
#define __smtk_session_cgm_CAUUID_h
#include "smtk/Options.h" // for CGM_HAVE_VERSION_H
#include "smtk/bridge/cgm/cgmSMTKExports.h" // for CGMSMTK_EXPORT
#include "smtk/bridge/cgm/Exports.h" // for SMTKCGMSESSION_EXPORT
#ifdef CGM_HAVE_VERSION_H
# include "cgm_version.h"
#endif
......@@ -34,7 +34,7 @@ enum CubitAttributeTypeExtensions
* and saved as persistent data, just as TDUniqueId uses CAUniqueId
* to preserve IDs.
*/
class CGMSMTK_EXPORT CAUUID : public CubitAttrib
class SMTKCGMSESSION_EXPORT CAUUID : public CubitAttrib
{
public:
static void registerWithAttributeManager();
......
......@@ -62,28 +62,28 @@ install(FILES PointerDefs.h DESTINATION include/smtk/bridge/cgm)
add_definitions(${CGM_DEFINES})
add_library(cgmSMTK ${cgmSrcs})
add_library(smtkCGMSession ${cgmSrcs})
#set cgmSMTK to publicly link to SMTKCore and CGM
target_link_libraries(cgmSMTK
#set smtkCGMSession to publicly link to smtkCore and CGM
target_link_libraries(smtkCGMSession
LINK_PUBLIC
SMTKCore
smtkCore
LINK_PRIVATE
${CGM_LIBRARIES}
)
smtk_export_header(cgmSMTK cgmSMTKExports.h)
smtk_export_header(smtkCGMSession Exports.h)
# Add compile definitions and include directories
set_property(TARGET cgmSMTK APPEND PROPERTY COMPILE_FLAGS ${CGM_DEFINES})
set_property(TARGET cgmSMTK APPEND PROPERTY INCLUDE_DIRECTORIES ${CGM_INCLUDE_DIRS})
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(cgmSMTK PROPERTIES INSTALL_NAME_DIR "${CMAKE_INSTALL_PREFIX}/lib")
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(cgmSMTK DEPENDS SMTKCore)
smtk_install_library(smtkCGMSession DEPENDS smtkCore)
# Normally we would uncomment this line:
# smtk_session_json("${CMAKE_CURRENT_SOURCE_DIR}/Session.json" cgmSessionJSON)
......@@ -124,16 +124,16 @@ smtk_public_headers(${cgmHeaders})
# Utility programs using CGM:
add_executable(cgm-convert cgm-convert.cxx)
target_link_libraries(cgm-convert SMTKCore cgmSMTK ${CGM_LIBRARIES})
target_link_libraries(cgm-convert smtkCore smtkCGMSession ${CGM_LIBRARIES})
add_executable(facet-convert facet-convert.cxx)
target_link_libraries(facet-convert SMTKCore ${CGM_LIBRARIES})
target_link_libraries(facet-convert smtkCore ${CGM_LIBRARIES})
if (SMTK_BUILD_VTK)
include("${VTK_USE_FILE}")
add_executable(vtk-to-cholla vtk-to-cholla.cxx)
target_link_libraries(vtk-to-cholla
SMTKCore
smtkCore
vtkCommonDataModel
vtkIOXML
${CGM_LIBRARIES}
......@@ -144,7 +144,7 @@ endif()
if(SMTK_BUILD_PYTHON_WRAPPINGS AND Shiboken_FOUND)
#extract the headers from cgm library we built to give them to shiboken
sbk_wrap_library(cgmSMTK
sbk_wrap_library(smtkCGMSession
GENERATOR_ARGS --avoid-protected-hack
WORKING_DIRECTORY ${SMTK_SOURCE_DIR}/smtk
LOCAL_INCLUDE_DIRECTORIES
......@@ -161,9 +161,9 @@ if(SMTK_BUILD_PYTHON_WRAPPINGS AND Shiboken_FOUND)
${CMAKE_CURRENT_BINARY_DIR}
TYPESYSTEM ${CMAKE_CURRENT_SOURCE_DIR}/typesystem.xml
HEADERS ${cgmHeaders}
DEPENDS SMTKCore
DEPENDS smtkCore
)