CMake: Added support for CMAKE_MODULE_PATH and extra CMake args (closes #4779)
parent
abad2ff005
commit
e1a83793ae
7 changed files with 67 additions and 6 deletions
@ -0,0 +1,9 @@ |
||||
## Added `cmake_module_path` and `cmake_args` to dependency |
||||
|
||||
The CMake dependency backend can now make use of existing `Find<name>.cmake` |
||||
files by setting the `CMAKE_MODULE_PATH` with the new `dependency()` property |
||||
`cmake_module_path`. The paths given to `cmake_module_path` should be relative |
||||
to the project source directory. |
||||
|
||||
Furthermore the property `cmake_args` was added to give CMake additional |
||||
parameters. |
@ -0,0 +1,9 @@ |
||||
find_package(ZLIB) |
||||
|
||||
if(ZLIB_FOUND OR ZLIB_Found) |
||||
set(SomethingLikeZLIB_FOUND ON) |
||||
set(SomethingLikeZLIB_LIBRARIES ${ZLIB_LIBRARY}) |
||||
set(SomethingLikeZLIB_INCLUDE_DIRS ${ZLIB_INCLUDE_DIR}) |
||||
else() |
||||
set(SomethingLikeZLIB_FOUND OFF) |
||||
endif() |
Loading…
Reference in new issue