find_package(SWIG REQUIRED)
include(${SWIG_USE_FILE})
-set(CMAKE_SWIG_FLAGS "-Wall")
+#TODO(spo): is -threads necessary?
+set(CMAKE_SWIG_FLAGS -threads -Wall)
# For doxyhelp.i
include_directories(
INCLUDE(Common)
SET(PROJECT_HEADERS
- ConstructionAPI.h
- ConstructionAPI_Point.h
- )
+ ConstructionAPI.h
+ ConstructionAPI_Point.h
+)
SET(PROJECT_SOURCES
- ConstructionAPI_Point.cpp
- )
+ ConstructionAPI_Point.cpp
+)
SET(PROJECT_LIBRARIES
- ModelAPI
- ModelHighAPI
- )
+ ModelAPI
+ ModelHighAPI
+)
INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
- )
+ ${PROJECT_SOURCE_DIR}/src/ModelAPI
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI
+)
#TODO(spo): is ${CAS_DEFINITIONS} necessary?
ADD_DEFINITIONS(-DCONSTRUCTIONAPI_EXPORTS ${CAS_DEFINITIONS})
#TODO(spo): is ModelAPI necessary or it could be received by INTERFACE_ ?
SET(SWIG_LINK_LIBRARIES
- ConstructionAPI
- ModelHighAPI
- ModelAPI
- ${PYTHON_LIBRARIES}
- )
+ ConstructionAPI
+ ModelHighAPI
+ ModelAPI
+ ${PYTHON_LIBRARIES}
+)
SET(SWIG_MODULE_ConstructionAPI_EXTRA_DEPS ${SWIG_MODULE_ConstructionAPI_EXTRA_DEPS}
- ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
- ${PROJECT_HEADERS}
- )
+ ${PROJECT_SOURCE_DIR}/src/ModelHighAPI/ModelHighAPI.i
+ ${PROJECT_HEADERS}
+)
SWIG_ADD_MODULE(ConstructionAPI python ConstructionAPI.i ${PROJECT_HEADERS})
SWIG_LINK_LIBRARIES(ConstructionAPI ${SWIG_LINK_LIBRARIES})
INCLUDE(UnitTest)
ADD_UNIT_TESTS(
- TestPoint.py
- )
+ TestPoint.py
+)
ADD_SUBDIRECTORY (Test)
INCLUDE(Common)
SET(PROJECT_HEADERS
- ModelHighAPI.h
- ModelHighAPI_Double.h
- ModelHighAPI_Interface.h
- )
+ ModelHighAPI.h
+ ModelHighAPI_Double.h
+ ModelHighAPI_Interface.h
+)
SET(PROJECT_SOURCES
- ModelHighAPI_Double.cpp
- ModelHighAPI_Interface.cpp
- )
+ ModelHighAPI_Double.cpp
+ ModelHighAPI_Interface.cpp
+)
SET(PROJECT_LIBRARIES
- Config
- Events
- )
+ Config
+ Events
+)
ADD_DEFINITIONS(-DMODELHIGHAPI_EXPORTS)
ADD_LIBRARY(ModelHighAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
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}
- )
+ ModelHighAPI
+ ${PYTHON_LIBRARIES}
+)
INCLUDE_DIRECTORIES(
- ${PROJECT_SOURCE_DIR}/src/Events
- ${PROJECT_SOURCE_DIR}/src/ModelAPI
-# ${PROJECT_SOURCE_DIR}/src/GeomAPI
-# ${PROJECT_SOURCE_DIR}/src/GeomAlgoAPI
+ ${PROJECT_SOURCE_DIR}/src/Events
+ ${PROJECT_SOURCE_DIR}/src/ModelAPI
)
SET(SWIG_SCRIPTS
- ${CMAKE_CURRENT_BINARY_DIR}/ModelHighAPI.py
- )
+ ${CMAKE_CURRENT_BINARY_DIR}/ModelHighAPI.py
+)
SWIG_ADD_MODULE(ModelHighAPI python ModelHighAPI.i ${PROJECT_HEADERS})
SWIG_LINK_LIBRARIES(ModelHighAPI ${SWIG_LINK_LIBRARIES})
INCLUDE(UnitTest)
ADD_UNIT_TESTS(
- TestDouble.py
- )
+ TestDouble.py
+)