Fix GLOB in CMakeLists.txt
-
file(GLOB RELATIVE IMAGES_FILES "${CMAKE_CURRENT_SOURCE_DIR}/src/resources/images/*.svg") message(STATUS "Files found: ${IMAGES_FILES}") message(STATUS "Current source dir: ${CMAKE_CURRENT_SOURCE_DIR}") qt_add_resources(app "images" PREFIX "/" FILES ${IMAGE_FILES} ){CMAKE_CURRENT_SOURCE_DIR}is correct but it does not find any file.-- Files found: -- Current source dir: /path/appIt works if I specify them manually:
FILES file1.svg file2.svg ... -
R realroot referenced this topic
-
You use 'RELATIVE' wrong, please read the docs: https://cmake.org/cmake/help/latest/command/file.html#glob
-
R realroot has marked this topic as solved