]> SALOME platform Git repositories - modules/shaper.git/blob - src/GeomDataAPI/CMakeLists.txt
Salome HOME
Issue #1315 Middle point constraint problem
[modules/shaper.git] / src / GeomDataAPI / CMakeLists.txt
1 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 FIND_PACKAGE(SWIG REQUIRED)
4 INCLUDE(${SWIG_USE_FILE})
5 INCLUDE_DIRECTORIES(${CMAKE_CURRENT_SOURCE_DIR})
6 INCLUDE(UnitTest)
7
8 SET(PROJECT_HEADERS
9     GeomDataAPI.h
10     GeomDataAPI_Point.h
11     GeomDataAPI_Dir.h
12     GeomDataAPI_Point2D.h
13 )
14
15 SET(PROJECT_SOURCES
16     GeomDataAPI_Point.cpp
17     GeomDataAPI_Dir.cpp
18     GeomDataAPI_Point2D.cpp
19 )
20
21 SET(PROJECT_LIBRARIES
22     ModelAPI
23 )
24
25 INCLUDE_DIRECTORIES(
26   ../GeomAPI        # only for SWIG
27   ../ModelAPI
28 )
29
30 ADD_DEFINITIONS(-DGEOMDATAAPI_EXPORTS)
31 ADD_LIBRARY(GeomDataAPI SHARED ${PROJECT_SOURCES} ${PROJECT_HEADERS})
32 SET_TARGET_PROPERTIES(GeomDataAPI PROPERTIES LINKER_LANGUAGE CXX)
33 TARGET_LINK_LIBRARIES(GeomDataAPI ${PROJECT_LIBRARIES})
34
35 SET(CMAKE_SWIG_FLAGS "-Wall")
36
37 SET_SOURCE_FILES_PROPERTIES(GeomDataAPI.i PROPERTIES CPLUSPLUS ON)
38 SET_SOURCE_FILES_PROPERTIES(GeomDataAPI.i PROPERTIES SWIG_DEFINITIONS "-shadow")
39
40 SET(SWIG_SCRIPTS
41   ${CMAKE_CURRENT_BINARY_DIR}/GeomDataAPI.py
42 )
43
44 SET(SWIG_LINK_LIBRARIES
45   GeomDataAPI
46   ${PYTHON_LIBRARIES}
47 )
48
49 SWIG_ADD_MODULE(GeomDataAPI python GeomDataAPI.i ${PROJECT_HEADERS})
50 SWIG_LINK_LIBRARIES(GeomDataAPI ${SWIG_LINK_LIBRARIES})
51
52 IF(WIN32)
53   SET_TARGET_PROPERTIES(_GeomDataAPI PROPERTIES DEBUG_OUTPUT_NAME _GeomDataAPI_d)
54 ENDIF(WIN32)
55
56 INSTALL(TARGETS GeomDataAPI DESTINATION ${SHAPER_INSTALL_BIN})
57 INSTALL(TARGETS _GeomDataAPI DESTINATION ${SHAPER_INSTALL_SWIG})
58 INSTALL(FILES ${SWIG_SCRIPTS} DESTINATION ${SHAPER_INSTALL_SWIG})
59
60 ADD_UNIT_TESTS(TestConstants.py)