Skip to content
Snippets Groups Projects
Commit 1727228e authored by Joan Vallvé Navarro's avatar Joan Vallvé Navarro
Browse files

dealing empty list

parent e755a92d
No related branches found
No related tags found
2 merge requests!8Cmake refactoring was merged to main, merge back to devel also,!7Resolve "Adapt to core CMakeLists.txt refactor"
This commit is part of merge request !8. Comments created here will be created in the context of that merge request.
......@@ -53,20 +53,22 @@ FIND_PACKAGE(falkolib QUIET)
find_package(PkgConfig)
pkg_check_modules(csm QUIET csm )
link_directories(${csm_LIBRARY_DIRS})
message(csm_LIBRARY_DIRS: ${csm_LIBRARY_DIRS})
# keep only the files in a lib folder: by default the "." is in csm_LIBRARY_DIRS,
# which is not acceptable for target_link_directories
foreach (my_entry IN LISTS csm_LIBRARY_DIRS)
message("csm_LIBRARY_DIRS has ${my_entry}")
endforeach()
list(FILTER csm_LIBRARY_DIRS INCLUDE REGEX "lib")
foreach (my_entry IN LISTS csm_LIBRARY_DIRS)
message("csm_LIBRARY_DIRS has ${my_entry}")
endforeach()
if(csm_FOUND)
if(NOT csm_LIBRARY_DIRS)
message("csm_LIBRARY_DIRS is empty")
else()
# keep only the files in a lib folder: by default the "." is in csm_LIBRARY_DIRS,
# which is not acceptable for target_link_directories
message(csm_LIBRARY_DIRS:)
foreach (my_entry IN LISTS csm_LIBRARY_DIRS)
message("csm_LIBRARY_DIRS has ${my_entry}")
endforeach()
list(FILTER csm_LIBRARY_DIRS INCLUDE REGEX "lib")
foreach (my_entry IN LISTS csm_LIBRARY_DIRS)
message("csm_LIBRARY_DIRS has ${my_entry}")
endforeach()
endif()
endif()
# ============ INCLUDES ============
INCLUDE_DIRECTORIES("include")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment