Archived issue #0023874

Converting OCCT MFC samples to CMake build system.

Open CASCADEOCCT:Samplesclosed10 public notes

Search issues

Description

See subject.

Public activity

10 archived notes

Participants are labeled by their role within this record.

01Commenter 1
CMake-build system has been implemented instead of multiple VS projects (one per version as we have currently).
02Commenter 2
RUNTIME_OUTPUT_DIRECTORY_DEBUG ${OCC_SAMPLES_OUTPUT_PATH}/libd
RUNTIME_OUTPUT_DIRECTORY_RELEASE ${OCC_SAMPLES_OUTPUT_PATH}/libd

Dear sdv, can you explain to me why do you decide to put debug and release versions of project in libd directory? or is it just misprint?
03Commenter 3
Dear Ivan, it is a mistake. I have found another problem.
In the upper level of CMake-file
# add mfcsamples.lib
link_directories( ${LIBRARY_OUTPUT_PATH}/libd )
I suppose it should be depend on build mode.
04Commenter 4
Ok, i'll fix
05Commenter 5
Thanks
06Commenter 6
may be we do some changes:

  1. move main CMakeLists.txt to root: <occt>\samples\mfc\standard
  2. move each sample CMakeLists.txt to their folders: <occt>\samples\mfc\standard\01_Geometry
  3. fill out env.bat and go.bat with path to OCCT libs and samples libs (occt root is predefined) in cmake generation process
  4. introduce choice of build mode in cmake configuration process (debug or release) due to the fact that we have to decide whether we use debug OCCT libraries or release OCCT libraries. this is a question...
  5. also we shouldn't forget about 3rdparty libraries using...

or may be... we integrate samples building into OCCT building? it will relieve us from defining occt libs path, 3rdparty path, e.t.c...

07Commenter 7
was done in CR23874 branch of OCCT git: (for standard mfc samples)

 1. move main CMakeLists.txt to root: <occt>\samples\mfc\standard
 2. move each sample CMakeLists.txt to their folders
 3. leave go.bat and env.bat in "standard" folder
 4. introduce choice of build mode in cmake configuration process (debug or release)

important! currently, to run samples you have to use a generated env.bat in casroot folder (to know about all necessary paths): go.bat calls <casroot>/env.bat

it is required a conversation to develop an approach run the samples without any generated non-cmake scripts.

08Commenter 8
ibs should integrate samples option into main cmake meta-project of occt
09Commenter 9
all changes are committed to CR23874
10Commenter 10
Tested with VS 2010 x64, please test / integrate

Related records