Archived issue #0023874
Converting OCCT MFC samples to CMake build system.
Description
See subject.
Public activity
10 archived notes
Participants are labeled by their role within this record.
CMake-build system has been implemented instead of multiple VS projects (one per version as we have currently).
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?
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?
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.
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.
Ok, i'll fix
Thanks
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...
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...
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.
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.
ibs should integrate samples option into main cmake meta-project of occt
all changes are committed to CR23874
Tested with VS 2010 x64, please test / integrate
Related records