1 cmake_minimum_required (VERSION 2.8.12 FATAL_ERROR)
3 set (CMAKE_SUPPRESS_REGENERATION TRUE)
5 set (CMAKE_CONFIGURATION_TYPES Release Debug RelWithDebInfo CACHE INTERNAL "" FORCE)
7 # macro: include patched file if it exists
8 macro (OCCT_INCLUDE_CMAKE_FILE BEING_INCLUDED_FILE)
9 if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/${BEING_INCLUDED_FILE}.cmake")
10 include (${APPLY_OCCT_PATCH_DIR}/${BEING_INCLUDED_FILE}.cmake)
12 include (${CMAKE_SOURCE_DIR}/${BEING_INCLUDED_FILE}.cmake)
16 # include variable description
17 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vardescr")
19 # set type of OCCT libraries
20 if (NOT BUILD_LIBRARY_TYPE)
21 set (BUILD_LIBRARY_TYPE "Shared" CACHE STRING "${BUILD_LIBRARY_TYPE_DESCR}" FORCE)
22 SET_PROPERTY(CACHE BUILD_LIBRARY_TYPE PROPERTY STRINGS Shared Static)
25 if ("${BUILD_LIBRARY_TYPE}" STREQUAL "Shared")
26 set (BUILD_SHARED_LIBS ON)
28 unset (BUILD_SHARED_LIBS)
31 # the name of the project
34 # Solution folder property
35 set_property (GLOBAL PROPERTY USE_FOLDERS ON)
37 set (INSTALL_OCCT_TEST_CASES OFF CACHE BOOL "${INSTALL_OCCT_TEST_CASES_DESCR}")
38 # a single-configuration generator like the Makefile generator defines CMAKE_BUILD_TYPE variable
39 # check this variable and set if it's required
40 if (DEFINED CMAKE_BUILD_TYPE AND NOT CMAKE_BUILD_TYPE) # single-configuration generator.
41 set (CMAKE_BUILD_TYPE "Release" CACHE STRING "Choose the type of build, options are: None(CMAKE_CXX_FLAGS or CMAKE_C_FLAGS used) Debug Release RelWithDebInfo MinSizeRel." FORCE)
44 # enable extended messages of many OCCT algorithms
45 set (OCCT_ALGO_EXTENDED_OUTPUT OFF CACHE BOOL "${OCCT_ALGO_EXTENDED_OUTPUT_DESCR}")
46 if (OCCT_ALGO_EXTENDED_OUTPUT_DESCR)
47 add_definitions (-DOCCT_DEBUG)
50 # Rebuild *.yacc and *.lex files
51 set (REBUILD_PLATFORM_DEPENDENT_CODE OFF CACHE BOOL "${REBUILD_PLATFORM_DEPENDENT_CODE_DESCR}")
53 # copy samples to install directory
54 set (INSTALL_OCCT_SAMPLES OFF CACHE BOOL "${INSTALL_OCCT_SAMPLES_DESCR}")
56 # install dir of the built project
57 set (INSTALL_DIR "" CACHE PATH "${INSTALL_DIR_DESCR}" )
58 set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE )
60 set (APPLY_OCCT_PATCH_DIR "" CACHE PATH "${APPLY_OCCT_PATCH_DIR_DESCR}")
62 # the list of being built toolkits
63 set (BUILD_ADDITIONAL_TOOLKITS "" CACHE STRING "${BUILD_ADDITIONAL_TOOLKITS_DESCR}")
64 separate_arguments (BUILD_ADDITIONAL_TOOLKITS)
67 set (BUILD_MODULE_OcctMfcSamples OFF CACHE BOOL "${BUILD_MODULE_OcctMfcSamples_DESCR}")
70 # whether use optional 3rdparty or not
72 set (USE_GLX OFF CACHE BOOL "${USE_GLX_DESCR}")
75 set (USE_FREEIMAGE OFF CACHE BOOL "${USE_FREEIMAGE_DESCR}")
76 set (USE_VTK OFF CACHE BOOL "${USE_VTK_DESCR}")
78 if (NOT DEFINED ANDROID)
79 set (USE_GL2PS OFF CACHE BOOL "${USE_GL2PS_DESCR}")
80 set (USE_TBB OFF CACHE BOOL "${USE_TBB_DESCR}")
81 #set (USE_OPENCL OFF CACHE BOOL "Is OpenCL used or not")
85 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_macros")
87 # include the patched or original list of modules
88 # list <MODULENAME>_TOOLKITS is created foreach module and contains its toolkits
89 # list <OCCT_MODULES> will contain all modules
90 OCCT_MODULES_AND_TOOLKITS (OCCT_MODULES)
92 foreach (OCCT_MODULE ${OCCT_MODULES})
93 BUILD_MODULE (${OCCT_MODULE})
97 set (BUILD_DOC_OcctOverview OFF CACHE BOOL "${BUILD_DOC_OcctOverview_DESCR}")
100 list (REMOVE_ITEM Visualization_TOOLKITS TKIVtk)
101 list (REMOVE_ITEM Draw_TOOLKITS TKIVtkDraw)
104 # accumulate used toolkits (first level) in BUILD_TOOLKITS variable
105 list (APPEND BUILD_TOOLKITS ${BUILD_ADDITIONAL_TOOLKITS})
107 foreach (OCCT_MODULE ${OCCT_MODULES})
108 if (BUILD_MODULE_${OCCT_MODULE})
109 list (APPEND BUILD_TOOLKITS ${${OCCT_MODULE}_TOOLKITS})
113 # DRAWEXE excluded when library build is static
114 if (NOT BUILD_SHARED_LIBS)
115 list (REMOVE_ITEM BUILD_TOOLKITS DRAWEXE)
116 message (STATUS "Info: DRAWEXE is not included due to ${BUILD_LIBRARY_TYPE} build library type")
119 # accumulate all used toolkits
120 list (REMOVE_DUPLICATES BUILD_TOOLKITS)
121 set (RAW_BUILD_TOOLKITS)
122 foreach(BUILD_TOOLKIT ${BUILD_TOOLKITS})
123 OCCT_TOOLKIT_FULL_DEP (${BUILD_TOOLKIT} TOOLKIT_FULL_DEPS)
124 list (APPEND RAW_BUILD_TOOLKITS ${BUILD_TOOLKIT} ${TOOLKIT_FULL_DEPS})
127 list (REMOVE_DUPLICATES RAW_BUILD_TOOLKITS)
128 set (BUILD_TOOLKITS ${RAW_BUILD_TOOLKITS})
130 # include the patched or original list of definitions and flags
131 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/occt_defs_flags")
133 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/3rdparty_macro")
135 if (NOT DEFINED 3RDPARTY_DIR)
136 set (3RDPARTY_DIR "" CACHE PATH ${3RDPARTY_DIR_DESCR})
139 # search for 3rdparty dir
140 if ("${3RDPARTY_DIR}" STREQUAL "")
141 if (DEFINED ENV{3RDPARTY_DIR})
142 set (3RDPARTY_DIR "$ENV{3RDPARTY_DIR}" CACHE PATH ${3RDPARTY_DIR_DESCR} FORCE)
143 elseif (EXISTS "${CMAKE_SOURCE_DIR}/../")
144 # in version 6.7.0 and above, occt parent directory contains 3rdparties
145 get_filename_component (3RDPARTY_DIR "${CMAKE_SOURCE_DIR}/../" ABSOLUTE)
146 set (3RDPARTY_DIR "${3RDPARTY_DIR}" CACHE PATH ${3RDPARTY_DIR_DESCR} FORCE)
150 # search for CSF_TclLibs variable in EXTERNLIB of each being used toolkit
151 OCCT_IS_PRODUCT_REQUIRED (CSF_TclLibs USE_TCL)
153 if ("${USE_TCL}" STREQUAL ON)
154 message (STATUS "Info: tcl is used by OCCT")
155 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tcl")
157 OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TCL")
158 OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TK")
161 # search for CSF_FREETYPE variable in EXTERNLIB of each being used toolkit
162 OCCT_IS_PRODUCT_REQUIRED (CSF_FREETYPE USE_FREETYPE)
164 if ("${USE_FREETYPE}" STREQUAL ON)
165 message (STATUS "Info: freetype is used by OCCT")
166 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freetype")
168 OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREETYPE")
169 OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_freetype2")
170 OCCT_CHECK_AND_UNSET ("3RDPARTY_FREETYPE_INCLUDE_DIR_ft2build")
175 add_definitions (-DHAVE_VTK)
176 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/vtk")
178 OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_VTK")
179 OCCT_CHECK_AND_UNSET ("INSTALL_VTK")
184 add_definitions (-DMACOSX_USE_GLX)
185 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/glx")
190 add_definitions (-DHAVE_FREEIMAGE)
191 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freeimage")
192 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/freeimageplus")
194 OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGE")
195 OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_FREEIMAGEPLUS")
196 OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGE")
197 OCCT_CHECK_AND_UNSET ("INSTALL_FREEIMAGEPLUS")
202 add_definitions (-DHAVE_GL2PS)
203 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/gl2ps")
205 OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_GL2PS")
206 OCCT_CHECK_AND_UNSET ("INSTALL_GL2PS")
211 # add_definitions (-DHAVE_OPENCL)
212 # OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/opencl")
214 # OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_OPENCL")
215 # OCCT_CHECK_AND_UNSET ("3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_HEADER")
216 # OCCT_CHECK_AND_UNSET ("3RDPARTY_OPENCL_ADDITIONAL_PATH_FOR_LIB")
217 # OCCT_CHECK_AND_UNSET ("INSTALL_OPENCL")
222 add_definitions (-DHAVE_TBB)
223 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/tbb")
225 OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TBB")
226 OCCT_CHECK_AND_UNSET_GROUP ("3RDPARTY_TBBMALLOC")
227 OCCT_CHECK_AND_UNSET ("INSTALL_TBB")
231 if (BUILD_DOC_OcctOverview)
232 if (NOT DEFINED INSTALL_DOC_OcctOverview)
233 set (INSTALL_DOC_OcctOverview OFF CACHE BOOL "${INSTALL_DOC_OcctOverview_DESCR}")
236 if (INSTALL_DOC_OcctOverview)
237 install (DIRECTORY "${CMAKE_BINARY_DIR}/doc/overview" DESTINATION "${INSTALL_DIR}/doc")
239 OCCT_INSTALL_FILE_OR_DIR ("dox/resources/overview.html" "${INSTALL_DIR}")
242 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/doxygen")
244 OCCT_CHECK_AND_UNSET ("INSTALL_DOC_OcctOverview")
246 OCCT_CHECK_AND_UNSET ("3RDPARTY_DOXYGEN_EXECUTABLE")
247 OCCT_CHECK_AND_UNSET ("3RDPARTY_DOXYGEN_DOT_EXECUTABLE")
251 if (REBUILD_PLATFORM_DEPENDENT_CODE)
252 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/bison")
254 OCCT_CHECK_AND_UNSET ("3RDPARTY_BISON_EXECUTABLE")
258 if (REBUILD_PLATFORM_DEPENDENT_CODE)
259 OCCT_INCLUDE_CMAKE_FILE ("adm/cmake/flex")
261 OCCT_CHECK_AND_UNSET ("3RDPARTY_FLEX_EXECUTABLE")
264 string (REGEX REPLACE ";" " " 3RDPARTY_NOT_INCLUDED "${3RDPARTY_NOT_INCLUDED}")
266 # check all 3rdparty paths
267 if (3RDPARTY_NOT_INCLUDED)
268 message (FATAL_ERROR "NOT FOUND: ${3RDPARTY_NOT_INCLUDED}" )
271 if (3RDPARTY_INCLUDE_DIRS)
272 list (REMOVE_DUPLICATES 3RDPARTY_INCLUDE_DIRS)
273 string (REGEX REPLACE ";" "\n\t" 3RDPARTY_INCLUDE_DIRS_WITH_ENDS "${3RDPARTY_INCLUDE_DIRS}")
274 message (STATUS "The directories containing 3rdparty headers: ${3RDPARTY_INCLUDE_DIRS_WITH_ENDS}")
275 include_directories (${3RDPARTY_INCLUDE_DIRS})
278 # include <cmake binary folder>/inc
279 include_directories (${CMAKE_BINARY_DIR}/inc)
281 if (3RDPARTY_LIBRARY_DIRS)
282 list (REMOVE_DUPLICATES 3RDPARTY_LIBRARY_DIRS)
283 string (REGEX REPLACE ";" "\n\t" 3RDPARTY_LIBRARY_DIRS_WITH_ENDS "${3RDPARTY_LIBRARY_DIRS}")
284 message (STATUS "The directories containing 3rdparty libraries: ${3RDPARTY_LIBRARY_DIRS_WITH_ENDS}")
285 link_directories (${3RDPARTY_LIBRARY_DIRS})
288 # Get all used variables: OS_WITH_BIT, COMPILER
289 OCCT_MAKE_OS_WITH_BITNESS()
290 OCCT_MAKE_COMPILER_SHORT_NAME()
293 set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
294 set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
295 set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/lib")
297 set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
298 set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
299 set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libi")
301 set (CMAKE_ARCHIVE_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
302 set (CMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
303 set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/libd")
306 set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELEASE "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bin")
307 set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_RELWITHDEBINFO "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bini")
308 set (CMAKE_LIBRARY_OUTPUT_DIRECTORY_DEBUG "${CMAKE_BINARY_DIR}/${OS_WITH_BIT}/${COMPILER}/bind")
311 if ("${INSTALL_DIR}" STREQUAL "")
312 get_filename_component (CMAKE_BINARY_DIR_PARENT ${CMAKE_BINARY_DIR} DIRECTORY)
314 set (INSTALL_DIR "${CMAKE_BINARY_DIR_PARENT}/install" CACHE PATH "${INSTALL_DIR_DESCR}" FORCE)
315 set (CMAKE_INSTALL_PREFIX "${INSTALL_DIR}" CACHE INTERNAL "" FORCE )
317 message (STATUS "Info: INSTALL_DIR has been set as ${INSTALL_DIR}")
320 message (STATUS "\nInfo: Collecting all OCCT header files into ${CMAKE_BINARY_DIR}/inc ...")
322 # collect all the headers to <binary dir>/inc folder
323 COLLECT_AND_INSTALL_OCCT_HEADER_FILES ("${CMAKE_BINARY_DIR}" "${BUILD_TOOLKITS}")
325 OCCT_INSTALL_FILE_OR_DIR ("data" "${INSTALL_DIR}")
326 OCCT_INSTALL_FILE_OR_DIR ("samples/tcl" "${INSTALL_DIR}/samples")
328 if (INSTALL_OCCT_SAMPLES)
329 OCCT_INSTALL_FILE_OR_DIR ("samples" "${INSTALL_DIR}")
332 if (INSTALL_OCCT_TEST_CASES)
333 OCCT_INSTALL_FILE_OR_DIR ("tests" "${INSTALL_DIR}")
342 # DRAW.BAT or DRAW.SH
343 if (APPLY_OCCT_PATCH_DIR AND EXISTS "${APPLY_OCCT_PATCH_DIR}/adm/templates/draw.${SCRIPT_EXT}")
344 install (FILES "${APPLY_OCCT_PATCH_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
345 OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
347 install (FILES "${CMAKE_SOURCE_DIR}/adm/templates/draw.${SCRIPT_EXT}" DESTINATION "${INSTALL_DIR}" PERMISSIONS
348 OWNER_READ OWNER_WRITE OWNER_EXECUTE GROUP_READ GROUP_WRITE GROUP_EXECUTE WORLD_READ WORLD_WRITE WORLD_EXECUTE)
350 OCCT_COPY_FILE_OR_DIR ("adm/templates/draw.${SCRIPT_EXT}" "${CMAKE_BINARY_DIR}")
352 set (SUB_CUSTOM_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.${SCRIPT_EXT}")
355 set (ADDITIONAL_CUSTOM_CONTENT "\nif exist \"%~dp0${SUB_CUSTOM_NAME}\" (\n call \"%~dp0${SUB_CUSTOM_NAME}\" %VCVER% %ARCH% %CASDEB% \n)")
357 set (ADDITIONAL_CUSTOM_CONTENT "\nif [ -e \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" ]; then\n source \"\${aScriptPath}/${SUB_CUSTOM_NAME}\" \"\${COMPILER}\" \"\${WOKSTATION}\${ARCH}\" \"\${CASDEB}\" \nfi")
360 # change custom.bat/sh
361 if (EXISTS "${INSTALL_DIR}/custom.${SCRIPT_EXT}")
362 file (READ "${INSTALL_DIR}/custom.${SCRIPT_EXT}" CUSTOM_CONTENT)
364 set (CUSTOM_CONTENT "${CUSTOM_CONTENT} ${ADDITIONAL_CUSTOM_CONTENT}")
366 file (WRITE "${INSTALL_DIR}/custom.${SCRIPT_EXT}" "${CUSTOM_CONTENT}")
368 OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.${SCRIPT_EXT}.main" "custom.${SCRIPT_EXT}" "custom.${SCRIPT_EXT}" "${INSTALL_DIR}")
371 # write current custom.bat/sh (for install directory)
372 set (SUB_CUSTOM_BUILD_NAME "custom_${COMPILER}_${COMPILER_BITNESS}.install.${SCRIPT_EXT}")
373 OCCT_CONFIGURE_AND_INSTALL ("adm/templates/custom.install.${SCRIPT_EXT}.in" "${SUB_CUSTOM_BUILD_NAME}" "${SUB_CUSTOM_NAME}" "${INSTALL_DIR}")
375 # write current custom.bat/sh (for build directory)
376 OCCT_CONFIGURE ("adm/templates/custom.build.${SCRIPT_EXT}.in" "${SUB_CUSTOM_NAME}")
378 if (BUILD_MODULE_OcctMfcSamples)
379 OCCT_INSTALL_FILE_OR_DIR ("adm/templates/sample.bat" "${INSTALL_DIR}")
380 OCCT_COPY_FILE_OR_DIR ("adm/templates/sample.bat" "${CMAKE_BINARY_DIR}")
383 # env script for draw in building environment
384 OCCT_CONFIGURE ("adm/templates/env.build.${SCRIPT_EXT}.in" "env.${SCRIPT_EXT}")
386 # end script for draw in standalone environment
388 set (BUILD_LETTER "")
389 OCCT_CONFIGURE ("adm/templates/env.install.${SCRIPT_EXT}.in" "env.install.release.${SCRIPT_EXT}")
390 install (FILES "${CMAKE_BINARY_DIR}/env.install.release.${SCRIPT_EXT}"
391 CONFIGURATIONS Release
392 DESTINATION "${INSTALL_DIR}"
393 RENAME "env.${SCRIPT_EXT}")
396 set (BUILD_LETTER "d")
397 OCCT_CONFIGURE ("adm/templates/env.install.${SCRIPT_EXT}.in" "env.install.debug.${SCRIPT_EXT}")
398 install (FILES "${CMAKE_BINARY_DIR}/env.install.debug.${SCRIPT_EXT}"
400 DESTINATION "${INSTALL_DIR}"
401 RENAME "env.${SCRIPT_EXT}")
403 # release with debug info version
404 set (BUILD_LETTER "i")
405 OCCT_CONFIGURE ("adm/templates/env.install.${SCRIPT_EXT}.in" "env.install.relwithdebinfo.${SCRIPT_EXT}")
406 install (FILES "${CMAKE_BINARY_DIR}/env.install.relwithdebinfo.${SCRIPT_EXT}"
407 CONFIGURATIONS RelWithDebInfo
408 DESTINATION "${INSTALL_DIR}"
409 RENAME "env.${SCRIPT_EXT}")
411 # copy DrawAppliInit from OCCT source to build directory
412 if (NOT EXISTS "${CMAKE_BINARY_DIR}/DrawAppliInit")
413 OCCT_COPY_FILE_OR_DIR (DrawAppliInit "${CMAKE_BINARY_DIR}")
417 FILE_TO_LIST ("adm/RESOURCES" RESOURCES)
418 foreach(RESOURCE ${RESOURCES})
419 get_filename_component(RESOURCE_FOLDER ${RESOURCE} DIRECTORY)
420 if(NOT "${RESOURCE_FOLDER}" STREQUAL "")
421 get_filename_component(RESOURCE_FOLDER ${RESOURCE_FOLDER} NAME)
422 OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR}/src/${RESOURCE_FOLDER}")
424 OCCT_INSTALL_FILE_OR_DIR ("src/${RESOURCE}" "${INSTALL_DIR}/src")
428 # include patched toolkit projects or original ones
429 foreach (BUILD_TOOLKIT ${BUILD_TOOLKITS})
430 OCCT_ADD_SUBDIRECTORY ("src/${BUILD_TOOLKIT}")
433 if (BUILD_DOC_OcctOverview)
434 OCCT_ADD_SUBDIRECTORY (dox)
438 if (MSVC AND 3RDPARTY_DLL_DIRS)
439 list (FIND BUILD_TOOLKITS DRAWEXE DRAWEXE_INDEX)
440 if (${DRAWEXE_INDEX} GREATER -1)
441 list (REMOVE_DUPLICATES 3RDPARTY_DLL_DIRS)
442 set (3RDPARTY_DLL_DIRS_FOR_PATH "")
444 foreach (3RDPARTY_DLL_DIR ${3RDPARTY_DLL_DIRS})
445 set (3RDPARTY_DLL_DIRS_FOR_PATH "${3RDPARTY_DLL_DIRS_FOR_PATH};${3RDPARTY_DLL_DIR}")
448 OCCT_MAKE_COMPILER_BITNESS()
449 set (X_COMPILER_BITNESS "x64")
450 if ("${COMPILER_BITNESS}" STREQUAL "32")
451 set (X_COMPILER_BITNESS "Win32")
454 OCCT_CONFIGURE ("adm/templates/DRAWEXE.vcxproj.user.in" "${CMAKE_BINARY_DIR}/src/DRAWEXE/DRAWEXE.vcxproj.user")
458 # samples do not support patch usage
459 if (BUILD_MODULE_OcctMfcSamples)
460 set (OCCT_ROOT ${CMAKE_SOURCE_DIR})
462 set (MFC_STANDARD_SAMPLES_DIR ${OCCT_ROOT}/samples/mfc/standard)
463 set (COMMON_WINMAIN_FILE ${MFC_STANDARD_SAMPLES_DIR}/Common/Winmain.cpp)
465 add_subdirectory(samples/mfc/standard/mfcsample)
466 add_subdirectory(samples/mfc/standard/01_Geometry)
467 add_subdirectory(samples/mfc/standard/02_Modeling)
468 add_subdirectory(samples/mfc/standard/03_Viewer2d)
469 add_subdirectory(samples/mfc/standard/04_Viewer3d)
470 add_subdirectory(samples/mfc/standard/05_ImportExport)
471 add_subdirectory(samples/mfc/standard/06_Ocaf)
472 add_subdirectory(samples/mfc/standard/07_Triangulation)
473 add_subdirectory(samples/mfc/standard/08_HLR)
474 add_subdirectory(samples/mfc/standard/09_Animation)
475 add_subdirectory(samples/mfc/standard/10_Convert)