Archived issue #0027290
CMake configuration files for OCCT
Description
CMake provides standard mechanism for the package (OCCT in our case) to specify its configuration (location of components, build settings etc.) for dependent projects. We shall use this mechanism for OCCT to make it more usable by CMake-based software.
See https://cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file for basic description and further references.
I suppose that implementation of CMake scripts of VTK can be used as example of how to apply this feature.
The project / package name of OCCT should be "OpenCASCADE".
At a minimum, file "OpenCASCADEConfig.cmake" should be created and installed. Additional files like "OpenCASCADEConfigVersion.cmake", "FindOpenCASCADE.cmake" can be created if reasonable.
The configuration file should indicate (in the order of decreasing priority):
- version of OCCT
- paths to headers, binaries, libs, resources
- used third-party libraries used (HAVE_*)
- installed modules / toolkits of OCCT
- other compiler and build options (e.g. compiler, static / dynamic build, etc.)
See https://cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file for basic description and further references.
I suppose that implementation of CMake scripts of VTK can be used as example of how to apply this feature.
The project / package name of OCCT should be "OpenCASCADE".
At a minimum, file "OpenCASCADEConfig.cmake" should be created and installed. Additional files like "OpenCASCADEConfigVersion.cmake", "FindOpenCASCADE.cmake" can be created if reasonable.
The configuration file should indicate (in the order of decreasing priority):
- version of OCCT
- paths to headers, binaries, libs, resources
- used third-party libraries used (HAVE_*)
- installed modules / toolkits of OCCT
- other compiler and build options (e.g. compiler, static / dynamic build, etc.)
Steps to reproduce
1) Configure and generate OCCT with CMake
2) Build and install it
3) Check INSTALL_DIR/OpenCASCADEConfig.cmake and OpenCASCADEConfigVersion.cmake files
4) Try to configure, generate and build products
2) Build and install it
3) Check INSTALL_DIR/OpenCASCADEConfig.cmake and OpenCASCADEConfigVersion.cmake files
4) Try to configure, generate and build products
Public activity
11 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: ski
Date: Wed Mar 23 16:47:04 2016 +0300
0027290: CMake configuration files for OCCT
CMake configuration file was created.
[revision removed]
Detailed log of new commits:
Author: ski
Date: Wed Mar 23 16:47:04 2016 +0300
0027290: CMake configuration files for OCCT
CMake configuration file was created.
OCCT branch CR27290 and PRODUCTS branch CR27290 were created.
Branch [archived branch] has been updated forcibly by Participant.
[revision removed]
[revision removed]
The configuration file and version file can be generated now.
PRODUCTS branch contains changes to use these files by find_package proc.
Instead of CAS_PROD_ROOT variable, CMake creates OpenCASCADE_DIR variable to save path to OCCT instalation directory.
Please, review.
PRODUCTS branch contains changes to use these files by find_package proc.
Instead of CAS_PROD_ROOT variable, CMake creates OpenCASCADE_DIR variable to save path to OCCT instalation directory.
Please, review.
Branch [archived branch] has been created by Author.
[revision removed]
Detailed log of new commits:
Author: ski
Date: Thu Mar 24 10:23:03 2016 +0300
0027290: CMake configuration files for OCCT
CMake scripts improved to install CMake configuration files for OpenCASCADE product.
[revision removed]
Detailed log of new commits:
Author: ski
Date: Thu Mar 24 10:23:03 2016 +0300
0027290: CMake configuration files for OCCT
CMake scripts improved to install CMake configuration files for OpenCASCADE product.
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Author.
[revision removed]
[revision removed]
Reviewed, slightly amended, and tested on Windows (vc10, vc12, vc14) and Linux (gcc). Please check compilation and installation and integrate. Note that OpenCASCADEConfig.cmake is created (by default) in lib/cmake/opencascade<-version> in Linux-style install layout, and in win64/vc10/lib in Windows-style layout.
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records