MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0027301Open CASCADE[OCCT] OCCT:Configurationpublic2016-03-23 14:132016-04-20 15:51
Reportervsr 
Assigned Toabv 
PriorityurgentSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.0.0Fixed in Version[OCCT] 7.0.0 
Summary0027301: CMake: export targets for OCCT
DescriptionCMake provides a way to export project's targets into the dedicated file, which can be then used in dependent project which build procedure is written with CMake.

Target files allow specifying inter-dependencies between project's libraries plus external dependencies - like libtool does, for instance.

This useful feature simplifies linking in dependent project - it is not mandatory to list all libraries to link the project, but only 1st level dependencies, while 2nd, 3rd, etc -level dependencies will be picked up automatically by CMake.

For example, I may only add explicitly linkage to TKMath, and linking to TKernel will be added automatically by CMake. This is especially useful for third-party libraries - you don't need to know which libraries OCCT is linked to.

This is done by:
a) Using EXPORT option with INSTALL(TARGETS ...) command (to specify target's group);
b) Using EXPORT(TARGETS ...) command to create targets file in a build tree;
c) Using INSTALL(EXPORT ...) to install targets file along with the project.

For more details, see
- Description of CMake's INSTALL command (in first turn, description of INSTALL(EXPORT ...) notation):
https://cmake.org/cmake/help/v2.8.11/cmake.html#command:install [^]
- Description of CMake's EXPORT command:
https://cmake.org/cmake/help/v2.8.11/cmake.html#command:export [^]

Example of usage:
https://cmake.org/Wiki/CMake/Tutorials/How_to_create_a_ProjectConfig.cmake_file [^]
TagsNo tags attached.
Test case number
Attached Files

- Relationships
parent of 0027344closedbugmaster Configuration, CMake - bugs with detecting third-party products 
child of 0027290closedbugmaster CMake configuration files for OCCT 

-  Notes
(0052156)
git (administrator)
2016-03-30 10:50

Branch CR27301 has been created by ski.

SHA-1: 5c25be3ff39bf5cfc80efc2fb5924f64e7eb8d07


Detailed log of new commits:

Author: ski
Date: Wed Mar 30 10:50:48 2016 +0300

    0027301: CMake: export targets for OCCT
    
    Added possibility to create CMake target files for OCCT.
(0052170)
git (administrator)
2016-03-30 12:24

Branch CR27301 has been updated forcibly by ski.

SHA-1: 905e44d78d5eca932ec2846f3f5fe0f959dce1bd
(0052189)
git (administrator)
2016-03-30 15:17

Branch CR27301 has been updated by ski.

SHA-1: 4e7afde687c2715dbf907064a0e5e0c2a7adec0c


Detailed log of new commits:

Author: ski
Date: Wed Mar 30 15:12:03 2016 +0300

    Define destination for DRAWEXE executable during installation

Author: ski
Date: Wed Mar 30 15:06:40 2016 +0300

    Install generated by CMake config, version and target files to correct directory (depending on configuration)

Author: ski
Date: Wed Mar 30 14:42:44 2016 +0300

    Use relative paths in generated files OpenCASCADETarget-*.cmake

Author: ski
Date: Wed Mar 30 12:48:50 2016 +0300

    Use same logic for single/multi configuration generators

(0052207)
git (administrator)
2016-03-30 18:17

Branch CR27301 has been updated by ski.

SHA-1: dfa2ce43d1f35ddf52f1e4f565d0ef9408f94d26


Detailed log of new commits:

Author: ski
Date: Wed Mar 30 18:07:49 2016 +0300

    Update generated OpenCASCADE Config file to contain correct build type and path to binaries and libraries

Author: ski
Date: Wed Mar 30 17:59:03 2016 +0300

    Remove unnecessary if statement

(0052208)
git (administrator)
2016-03-30 18:28

Branch CR27301 has been updated forcibly by ski.

SHA-1: 920c7070142105e9ac4d23905d8ca378cc457ad5
(0052213)
git (administrator)
2016-03-30 18:44

Branch CR27301_1 has been created by abv.

SHA-1: 3909db622b72929d497270b7e6be4f17fde66876


Detailed log of new commits:

Author: abv
Date: Wed Mar 30 17:26:39 2016 +0300

    0027301: CMake: export targets for OCCT
    
    Added possibility to create CMake target files for OCCT.
    Install generated by CMake config, version and target files to correct directory (depending on configuration).
    Define destination for DRAWEXE executable during installation.
(0052215)
git (administrator)
2016-03-30 18:53

Branch CR27301_1 has been updated forcibly by abv.

SHA-1: 7dcea7a91701cfbd35ea656598afb68a6f73178a
(0052249)
git (administrator)
2016-03-31 20:18

Branch CR27301_1 has been updated by ski.

SHA-1: 10ea4506388a71c093a394b64c730c117ee44ac4


Detailed log of new commits:

Author: ski
Date: Thu Mar 31 20:17:30 2016 +0300

    Updated installation path for OpenCASCADETarget file for single generator

Author: ski
Date: Thu Mar 31 19:56:05 2016 +0300

    Corrected misprint in OpenCASCADEConfig.cmake.in template

Author: ski
Date: Thu Mar 31 18:24:27 2016 +0300

    Use case-insensitive name for patching OpenCASCADETarget-*.cmake files

(0052296)
git (administrator)
2016-04-01 15:14

Branch CR27301_1 has been updated by ski.

SHA-1: 0449e8b46d3902ddcfd9d1cfbe40f748a510815b


Detailed log of new commits:

Author: ski
Date: Fri Apr 1 15:13:51 2016 +0300

    Added list of available OpenCASCADE libraries for each module.
    Also it is possible now to use COMPOMENT agrument in find_package utility in dependent projects.

(0052366)
git (administrator)
2016-04-05 00:15

Branch CR27301_2 has been created by abv.

SHA-1: 377939429c4b4694c9404a151406f08420146282


Detailed log of new commits:

Author: ski
Date: Mon Apr 4 19:51:24 2016 +0300

    0027301: CMake: export targets for OCCT
    
    Enabled creation of CMake target files (one per module) for OCCT at install time.
    Variables enumerating available OCCT modules and toolkits by module are added in CMake configuration file.
    Added check of availability of OCCT modules specified by OpenCASCADE_FIND_COMPONENTS variable.
    Location of CMake configuration and target files in Windows layout is changed to $INSTALL_DIR/cmake (thus common for all configurations), to be found by CMake find_package() function.
(0052367)
git (administrator)
2016-04-05 07:41

Branch CR27301_2 has been updated by abv.

SHA-1: 96a9eb670798500c4cbdbc54af2cc5b2a9970d48


Detailed log of new commits:

Author: abv
Date: Tue Apr 5 07:41:07 2016 +0300

    Avoid unnecessary hacks on cmake files

(0052368)
git (administrator)
2016-04-05 09:10

Branch CR27301_2 has been updated forcibly by abv.

SHA-1: 2ef27c65c84979bf3c289d4ddb7986b45da67c1f
(0052369)
abv (manager)
2016-04-05 09:16

Sergey, I have reviwed and updated the patch, and it seems to work now for both single (Linux) and multiple (Windows) configurations. The main change is taking into account point (3) in 0027344: now CMake configuration and target files in Windows layout are installed to ./cmake folder for all configurations. This means that OpenCASCADEConfig.cmake cannot contain configuration-specific parameters, hence I removed setting of OpenCASCADE_BUILD_TYPE in multi-configuration mode.

Please review asap.
(0052399)
git (administrator)
2016-04-05 15:54

Branch CR27301_2 has been updated forcibly by abv.

SHA-1: ada9ef40c2dad256a72b8e4bc429d37b1c929f68
(0052409)
ski (developer)
2016-04-05 18:20

No remarks, please proceed.
(0052882)
git (administrator)
2016-04-17 13:27

Branch CR27301 has been deleted by kgv.

SHA-1: 920c7070142105e9ac4d23905d8ca378cc457ad5
(0053224)
git (administrator)
2016-04-17 14:42

Branch CR27301_2 has been deleted by kgv.

SHA-1: ada9ef40c2dad256a72b8e4bc429d37b1c929f68
(0053334)
git (administrator)
2016-04-20 11:34

Branch CR27301_1 has been deleted by inv.

SHA-1: 0449e8b46d3902ddcfd9d1cfbe40f748a510815b

- Related Changesets
occt: master ada9ef40
Timestamp: 2016-04-04 16:51:24
Author: abv
Committer: abv
Details ] Diff ]
0027301: CMake: export targets for OCCT

Enabled creation of CMake target files (one per module) for OCCT at install time.
Variables enumerating available OCCT toolkits by module are added in CMake configuration file.
Added check of availability of OCCT modules specified by OpenCASCADE_FIND_COMPONENTS variable.
Location of CMake configuration and target files in Windows layout is changed to $INSTALL_DIR/cmake (thus common for all configurations), to be found by standard search logic of CMake find_package() function.
mod - adm/cmake/occt_macros.cmake Diff ] File ]
mod - adm/cmake/occt_toolkit.cmake Diff ] File ]
mod - adm/templates/OpenCASCADEConfig.cmake.in Diff ] File ]
mod - CMakeLists.txt Diff ] File ]

- Issue History
Date Modified Username Field Change
2016-03-23 14:13 vsr New Issue
2016-03-23 14:13 vsr Assigned To => bugmaster
2016-03-24 11:33 bugmaster Assigned To bugmaster => ski
2016-03-25 15:06 ski Relationship added child of 0027290
2016-03-25 15:06 ski Status new => assigned
2016-03-30 10:50 git Note Added: 0052156
2016-03-30 12:24 git Note Added: 0052170
2016-03-30 15:17 git Note Added: 0052189
2016-03-30 18:17 git Note Added: 0052207
2016-03-30 18:28 git Note Added: 0052208
2016-03-30 18:44 git Note Added: 0052213
2016-03-30 18:53 git Note Added: 0052215
2016-03-31 20:18 git Note Added: 0052249
2016-04-01 15:14 git Note Added: 0052296
2016-04-05 00:15 git Note Added: 0052366
2016-04-05 07:41 git Note Added: 0052367
2016-04-05 09:10 git Note Added: 0052368
2016-04-05 09:16 abv Note Added: 0052369
2016-04-05 09:16 abv Priority normal => urgent
2016-04-05 09:16 abv Status assigned => resolved
2016-04-05 09:17 abv Relationship added parent of 0027344
2016-04-05 15:54 git Note Added: 0052399
2016-04-05 18:20 ski Note Added: 0052409
2016-04-05 18:20 ski Assigned To ski => bugmaster
2016-04-05 18:20 ski Status resolved => reviewed
2016-04-05 18:22 bugmaster Status reviewed => tested
2016-04-05 18:22 bugmaster Target Version 7.1.0 => 7.0.0
2016-04-06 10:33 abv Changeset attached => occt master ada9ef40
2016-04-06 10:33 abv Assigned To bugmaster => abv
2016-04-06 10:33 abv Status tested => verified
2016-04-06 10:33 abv Resolution open => fixed
2016-04-17 13:27 git Note Added: 0052882
2016-04-17 14:42 git Note Added: 0053224
2016-04-20 11:34 git Note Added: 0053334
2016-04-20 15:42 aiv Fixed in Version => 7.0.0
2016-04-20 15:51 aiv Status verified => closed


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker