1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10)
4 SET (SHAPER_Version 2.3.1)
6 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeCommon" ${CMAKE_MODULE_PATH})
17 IF(CMAKE_COMPILER_IS_GNUCC)
18 #C++11 is not supported on some platforms, disable it
19 MESSAGE(STATUS "Setting -std=c++0x flag for the gcc...")
20 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
22 #Supporting test coverage checks (gcov) in the DEBUG mode
25 MESSAGE(STATUS "Setting flags for gcov support the gcc...")
26 SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
27 SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -g -O0 -fprofile-arcs -ftest-coverage")
28 SET(CMAKE_SHARED_LINKER_FLAGS "-lgcov")
30 SETUP_TARGET_FOR_COVERAGE(test_coverage # Name for custom target.
31 ctest # Name of the test driver executable that runs the tests.
32 coverage) # Name of output directory.
33 ENDIF(USE_TEST_COVERAGE)
35 #SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -E")
36 MESSAGE(STATUS "gcc flags are: " ${CMAKE_CXX_FLAGS})
37 MESSAGE(STATUS "linker flags are: " ${CMAKE_SHARED_LINKER_FLAGS})
38 ENDIF(CMAKE_COMPILER_IS_GNUCC)
42 SET(SHAPER_INSTALL_ADDONS bin/salome CACHE INTERNAL "" FORCE)
43 SET(SHAPER_INSTALL_BIN lib/salome CACHE INTERNAL "" FORCE)
44 SET(SHAPER_INSTALL_PLUGIN_FILES lib/salome CACHE INTERNAL "" FORCE)
45 SET(SHAPER_INSTALL_PYTHON_API bin/salome CACHE INTERNAL "" FORCE)
46 SET(SHAPER_INSTALL_PYTHON_FILES bin/salome CACHE INTERNAL "" FORCE)
47 SET(SHAPER_INSTALL_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE)
48 SET(SHAPER_INSTALL_SWIG bin/salome CACHE INTERNAL "" FORCE)
49 SET(SHAPER_INSTALL_QM_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE)
50 SET(SHAPER_INSTALL_XML_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE)
51 SET(SHAPER_INSTALL_GUI_DOC share/doc/salome/gui/SHAPER CACHE INTERNAL "" FORCE)
52 SET(SHAPER_INSTALL_TUI_DOC share/doc/salome/tui/SHAPER CACHE INTERNAL "" FORCE)
54 SET(SHAPER_INSTALL_ADDONS addons CACHE INTERNAL "" FORCE)
55 SET(SHAPER_INSTALL_BIN bin CACHE INTERNAL "" FORCE)
56 SET(SHAPER_INSTALL_PLUGIN_FILES plugins CACHE INTERNAL "" FORCE)
57 SET(SHAPER_INSTALL_PYTHON_API PythonAPI CACHE INTERNAL "" FORCE)
58 SET(SHAPER_INSTALL_PYTHON_FILES plugins CACHE INTERNAL "" FORCE)
59 SET(SHAPER_INSTALL_RESOURCES resources CACHE INTERNAL "" FORCE)
60 SET(SHAPER_INSTALL_SWIG swig CACHE INTERNAL "" FORCE)
61 SET(SHAPER_INSTALL_QM_RESOURCES bin CACHE INTERNAL "" FORCE)
62 SET(SHAPER_INSTALL_XML_RESOURCES plugins CACHE INTERNAL "" FORCE)
63 SET(SHAPER_INSTALL_GUI_DOC doc CACHE INTERNAL "" FORCE)
64 SET(SHAPER_INSTALL_TUI_DOC doc CACHE INTERNAL "" FORCE)
67 #IF(CMAKE_BUILD_TYPE MATCHES Release)
68 ADD_SUBDIRECTORY (doc)
69 #ENDIF(CMAKE_BUILD_TYPE MATCHES Release)
70 ADD_SUBDIRECTORY (src/Config)
71 ADD_SUBDIRECTORY (src/Events)
72 ADD_SUBDIRECTORY (src/Model)
73 ADD_SUBDIRECTORY (src/ModelAPI)
74 ADD_SUBDIRECTORY (src/GeomAPI)
75 ADD_SUBDIRECTORY (src/GeomAlgoAPI)
76 ADD_SUBDIRECTORY (src/GeomAlgoImpl)
77 ADD_SUBDIRECTORY (src/GeomData)
78 ADD_SUBDIRECTORY (src/GeomDataAPI)
79 ADD_SUBDIRECTORY (src/PartSetPlugin)
80 ADD_SUBDIRECTORY (src/ConstructionPlugin)
81 ADD_SUBDIRECTORY (src/BuildPlugin)
82 ADD_SUBDIRECTORY (src/FeaturesPlugin)
83 ADD_SUBDIRECTORY (src/SamplePanelPlugin)
84 ADD_SUBDIRECTORY (src/SketcherPrs)
85 ADD_SUBDIRECTORY (src/SketchPlugin)
86 ADD_SUBDIRECTORY (src/SketchSolver)
87 ADD_SUBDIRECTORY (src/ModuleBase)
88 ADD_SUBDIRECTORY (src/PartSet)
90 ADD_SUBDIRECTORY (src/XGUI)
91 ADD_SUBDIRECTORY (src/ExchangePlugin)
92 ADD_SUBDIRECTORY (src/GeomValidators)
93 ADD_SUBDIRECTORY (src/InitializationPlugin)
94 ADD_SUBDIRECTORY (src/ParametersPlugin)
95 ADD_SUBDIRECTORY (src/PythonAddons)
96 ADD_SUBDIRECTORY (src/PythonAPI)
97 # High Level C++/Python API
98 ADD_SUBDIRECTORY (src/ModelHighAPI)
99 ADD_SUBDIRECTORY (src/ConstructionAPI)
100 ADD_SUBDIRECTORY (src/ExchangeAPI)
103 ADD_SUBDIRECTORY (src/SHAPERGUI)
104 ADD_SUBDIRECTORY (src/ConnectorPlugin)
105 ENDIF(${HAVE_SALOME})
109 # Add the uninstall target for eclipse IDE
110 if (CMAKE_GENERATOR MATCHES "NMake Makefiles")
111 configure_file("${CMAKE_SOURCE_DIR}/CMakeCommon/cmake_uninstall.cmake.in"
112 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
114 add_custom_target(uninstall
115 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
116 endif (CMAKE_GENERATOR MATCHES "NMake Makefiles")