Slicer: 2145-support-for-installing-extension-from-file cd985077
Author | Committer | Branch | Timestamp | Parent |
---|---|---|---|---|
jcfr | jcfr | 2145-support-for-installing-extension-from-file | 2013-05-25 02:23:55 | 2145-support-for-installing-extension-from-file 940b1f85 |
Changeset | COMP: Allow use of 'project()' in CMakeLists.txt of extension/module The previous approach enforcing to NOT use "project()" in CMakeLists.txt Using recent version of CMake, this "hack" was preventing extension from To prevent the configure error, "SlicerBlockSetCMakeOSXVariables" is not That said, to allow the CMAKEOSX* to (optionally) be set automatically, This also make it possible to call "project()" within the CMakeLists.txt To optionally have the CMAKEOSX* variable set within a project, the find_package(Slicer COMPONENTS ConfigurePrerequisites) before any "project()" calls. For completeness, the discussion with CMake developer regarding the possible // ------------------ Hi Brad, To summarize, the user build a building using a line similar to: cmake -DSlicer_DIR:PATH=/path/to/Slicer-build -DCMAKE_BUILD_TYPE:STRING=Release ../MyPlugin Passing Slicer_DIR is the only requirement. // ------------------ // ------------------
where project() was called within the Slicer use file. // ------------------ find_package(Slicer COMPONENTS ConfigurationPrerequisites) project(Foo) find_package(A ..) Can I be sure that the first call to "find_package" will be done before language feature are enabled ? Thanks // -------------------------- On 04/19/2013 10:54 AM, Jean-Christophe Fillion-Robin wrote:
Great, so find_package doesn't actually need to search but only
Instead of the above three lines, try these three:: project(Foo NONE) SlicerConfig.cmake provides the SlicerConfigPlugin macro to:
Larger projects that provide a Slicer plugin along with a bunch
Yes, but the above method may be even simpler. git-svn-id: http://svn.slicer.org/Slicer4/trunk@22038 3bd1e089-480b-0410-8dfb-8563597acbee |
|||
mod - CMake/SlicerConfig.cmake.in | Diff File | |||
mod - CMake/UseSlicer.cmake.in | Diff File | |||
mod - Extensions/CMake/SlicerBlockBuildPackageAndUploadExtension.cmake | Diff File |