${PROJECT_SOURCE_DIR}/src/ModelHighAPI
)
+#TODO(spo): is ${CAS_DEFINITIONS} necessary?
ADD_DEFINITIONS(-DCONSTRUCTIONAPI_EXPORTS ${CAS_DEFINITIONS})
ADD_LIBRARY(ConstructionAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
TARGET_LINK_LIBRARIES(ConstructionAPI ${PROJECT_LIBRARIES})
SET_SOURCE_FILES_PROPERTIES(ConstructionAPI.i PROPERTIES CPLUSPLUS ON)
SET_SOURCE_FILES_PROPERTIES(ConstructionAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+#TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ ?
SET(SWIG_LINK_LIBRARIES
ConstructionAPI
ModelHighAPI
## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
-FIND_PACKAGE(SWIG REQUIRED)
-INCLUDE(${SWIG_USE_FILE})
-INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
-INCLUDE(UnitTest)
+INCLUDE(Common)
SET(PROJECT_HEADERS
ModelHighAPI.h
Config
Events
)
-
-SET(CMAKE_SWIG_FLAGS -threads -Wall)
-ADD_DEFINITIONS(-DModelHighAPI_EXPORTS)
+ADD_DEFINITIONS(-DMODELHIGHAPI_EXPORTS)
ADD_LIBRARY(ModelHighAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
+#TODO(spo): is it necessary?
SET_TARGET_PROPERTIES(ModelHighAPI PROPERTIES LINKER_LANGUAGE CXX)
TARGET_LINK_LIBRARIES(ModelHighAPI ${PROJECT_LIBRARIES})
+# SWIG wrapper
+
+INCLUDE(PythonAPI)
+
+#TODO(spo): is it necessary?
+SET(CMAKE_SWIG_FLAGS -threads -Wall)
+
+SET_SOURCE_FILES_PROPERTIES(ModelHighAPI.i PROPERTIES CPLUSPLUS ON)
+SET_SOURCE_FILES_PROPERTIES(ModelHighAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
+
+SET(SWIG_LINK_LIBRARIES
+ ModelHighAPI
+ ${PYTHON_LIBRARIES}
+ )
+
INCLUDE_DIRECTORIES(
${PROJECT_SOURCE_DIR}/src/Events
${PROJECT_SOURCE_DIR}/src/ModelAPI
# ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
)
-SET_SOURCE_FILES_PROPERTIES(ModelHighAPI.i PROPERTIES CPLUSPLUS ON)
-SET_SOURCE_FILES_PROPERTIES(ModelHighAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
-
SET(SWIG_SCRIPTS
${CMAKE_CURRENT_BINARY_DIR}/ModelHighAPI.py
)
-SET(SWIG_LINK_LIBRARIES
- ModelHighAPI
- ${PYTHON_LIBRARIES}
- )
-
SWIG_ADD_MODULE(ModelHighAPI python ModelHighAPI.i ${PROJECT_HEADERS})
SWIG_LINK_LIBRARIES(ModelHighAPI ${SWIG_LINK_LIBRARIES})
INSTALL(TARGETS ModelHighAPI DESTINATION ${SHAPER_INSTALL_BIN})
INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
+# Tests
+
+INCLUDE(UnitTest)
+
ADD_UNIT_TESTS(
TestDouble.py
)