1 CMAKE_MINIMUM_REQUIRED(VERSION 2.8.10)
4 SET (SHAPER_Version 2.6.0)
6 SET(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/CMakeCommon" ${CMAKE_MODULE_PATH})
15 INCLUDE(FindDFBrowser)
16 INCLUDE(FindVInspector)
19 IF(DEFINED ENV{LIBXML2_ROOT_DIR})
21 FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/lib/libxml2.lib LIBXML2_LIBRARIES)
22 FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/include LIBXML2_INCLUDE_DIR)
24 FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/lib/libxml2.so LIBXML2_LIBRARIES)
25 FILE(TO_CMAKE_PATH $ENV{LIBXML2_ROOT_DIR}/include/libxml2 LIBXML2_INCLUDE_DIR)
28 # It could be called only once
29 FIND_PACKAGE(LibXml2 REQUIRED)
32 SET(SHAPER_INSTALL_ADDONS bin/salome CACHE INTERNAL "" FORCE)
33 SET(SHAPER_INSTALL_BIN lib/salome CACHE INTERNAL "" FORCE)
34 SET(SHAPER_INSTALL_PLUGIN_FILES lib/salome CACHE INTERNAL "" FORCE)
35 SET(SHAPER_INSTALL_PYTHON_API bin/salome CACHE INTERNAL "" FORCE)
36 SET(SHAPER_INSTALL_PYTHON_FILES bin/salome CACHE INTERNAL "" FORCE)
37 SET(SHAPER_INSTALL_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE)
38 SET(SHAPER_INSTALL_SWIG bin/salome CACHE INTERNAL "" FORCE)
39 SET(SHAPER_INSTALL_QM_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE)
40 SET(SHAPER_INSTALL_XML_RESOURCES share/salome/resources/shaper CACHE INTERNAL "" FORCE)
41 SET(SHAPER_INSTALL_GUI_DOC share/doc/salome/gui/SHAPER CACHE INTERNAL "" FORCE)
42 SET(SHAPER_INSTALL_TUI_DOC share/doc/salome/tui/SHAPER CACHE INTERNAL "" FORCE)
43 # without SALOME there is another kind of documentation, separated one
44 ADD_SUBDIRECTORY (doc)
46 SET(SHAPER_INSTALL_ADDONS addons CACHE INTERNAL "" FORCE)
47 SET(SHAPER_INSTALL_BIN bin CACHE INTERNAL "" FORCE)
48 SET(SHAPER_INSTALL_PLUGIN_FILES plugins CACHE INTERNAL "" FORCE)
49 SET(SHAPER_INSTALL_PYTHON_API PythonAPI CACHE INTERNAL "" FORCE)
50 SET(SHAPER_INSTALL_PYTHON_FILES plugins CACHE INTERNAL "" FORCE)
51 SET(SHAPER_INSTALL_RESOURCES resources CACHE INTERNAL "" FORCE)
52 SET(SHAPER_INSTALL_SWIG swig CACHE INTERNAL "" FORCE)
53 SET(SHAPER_INSTALL_QM_RESOURCES bin CACHE INTERNAL "" FORCE)
54 SET(SHAPER_INSTALL_XML_RESOURCES plugins CACHE INTERNAL "" FORCE)
55 SET(SHAPER_INSTALL_GUI_DOC doc CACHE INTERNAL "" FORCE)
56 SET(SHAPER_INSTALL_TUI_DOC doc CACHE INTERNAL "" FORCE)
59 ADD_SUBDIRECTORY (src/Config)
60 ADD_SUBDIRECTORY (src/Events)
61 ADD_SUBDIRECTORY (src/Model)
62 ADD_SUBDIRECTORY (src/XAO)
63 ADD_SUBDIRECTORY (src/GeomAPI)
64 ADD_SUBDIRECTORY (src/ModelAPI)
65 ADD_SUBDIRECTORY (src/ModelGeomAlgo)
66 ADD_SUBDIRECTORY (src/GeomAlgoAPI)
67 ADD_SUBDIRECTORY (src/GeomAlgoImpl)
68 ADD_SUBDIRECTORY (src/GeomData)
69 ADD_SUBDIRECTORY (src/GeomDataAPI)
70 ADD_SUBDIRECTORY (src/PartSetPlugin)
71 ADD_SUBDIRECTORY (src/ConstructionPlugin)
72 ADD_SUBDIRECTORY (src/BuildPlugin)
73 ADD_SUBDIRECTORY (src/PrimitivesPlugin)
74 ADD_SUBDIRECTORY (src/FeaturesPlugin)
75 ADD_SUBDIRECTORY (src/CollectionPlugin)
76 ADD_SUBDIRECTORY (src/SamplePanelPlugin)
77 ADD_SUBDIRECTORY (src/SketcherPrs)
78 ADD_SUBDIRECTORY (src/SketchPlugin)
79 ADD_SUBDIRECTORY (src/SketchSolver)
80 ADD_SUBDIRECTORY (src/ModuleBase)
81 ADD_SUBDIRECTORY (src/PartSet)
83 ADD_SUBDIRECTORY (src/XGUI)
84 ADD_SUBDIRECTORY (src/ExchangePlugin)
85 ADD_SUBDIRECTORY (src/GeomValidators)
86 ADD_SUBDIRECTORY (src/InitializationPlugin)
87 ADD_SUBDIRECTORY (src/ParametersPlugin)
88 ADD_SUBDIRECTORY (src/PythonAddons)
89 ADD_SUBDIRECTORY (src/PythonAPI)
90 # High Level C++/Python API
91 ADD_SUBDIRECTORY (src/ModelHighAPI)
92 ADD_SUBDIRECTORY (src/BuildAPI)
93 ADD_SUBDIRECTORY (src/ConnectorAPI)
94 ADD_SUBDIRECTORY (src/ConstructionAPI)
95 ADD_SUBDIRECTORY (src/ExchangeAPI)
96 ADD_SUBDIRECTORY (src/FeaturesAPI)
97 ADD_SUBDIRECTORY (src/CollectionAPI)
98 ADD_SUBDIRECTORY (src/ParametersAPI)
99 ADD_SUBDIRECTORY (src/PartSetAPI)
100 ADD_SUBDIRECTORY (src/PrimitivesAPI)
101 ADD_SUBDIRECTORY (src/SketchAPI)
104 ADD_SUBDIRECTORY (src/SHAPERGUI)
105 ADD_SUBDIRECTORY (src/ConnectorPlugin)
106 ENDIF(${HAVE_SALOME})
110 # Add the uninstall target for eclipse IDE
111 if (CMAKE_GENERATOR MATCHES "NMake Makefiles")
112 configure_file("${CMAKE_SOURCE_DIR}/CMakeCommon/cmake_uninstall.cmake.in"
113 "${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake"
115 add_custom_target(uninstall
116 COMMAND ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_BINARY_DIR}/cmake_uninstall.cmake)
117 endif (CMAKE_GENERATOR MATCHES "NMake Makefiles")
119 # Add special Git hooks
120 if((EXISTS "${CMAKE_SOURCE_DIR}/.git") AND (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/.git"))
121 if(IS_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/.git")
122 set(GIT_SUBMODULE_PATH ".git")
124 file(READ "${CMAKE_CURRENT_SOURCE_DIR}/.git" GIT_SUBMODULE_PATH)
125 string(REGEX REPLACE "gitdir: " "" GIT_SUBMODULE_PATH "${GIT_SUBMODULE_PATH}")
126 string(REGEX REPLACE "\n" "" GIT_SUBMODULE_PATH "${GIT_SUBMODULE_PATH}")
129 configure_file("${CMAKE_CURRENT_SOURCE_DIR}/GitHooks/pre-commit.in"
130 "${CMAKE_CURRENT_SOURCE_DIR}/${GIT_SUBMODULE_PATH}/hooks/pre-commit")