I have linked the SFML and TGUI libraries in my project. I also included these libraries in another CMakeLists in this project. When I start building the project, I get a message that the files from these libraries cannot be found. And every time it seems to be connected only with TGUI. I even tried using target_include_directories to include the library header files, but it didn’t help. Additionally, this project lists both libraries in the search path header.
CmakeLists:
add_library(ui STATIC
src/music_list.cpp
src/button.cpp
ui-config/src/json-ui-config.cpp
src/menu.cpp
)
target_include_directories(ui PRIVATE ${TGUI_INCLUDE_DIR} include ${CMAKE_SOURCE_DIR}/json ui-config/include)
target_link_libraries(ui PRIVATE tgui sfml-system sfml-graphics sfml-window sfml-main music-storage json-storage)
I tried to clear the cache, reload the CMake project, relink libraries and recreate the class where the error occurs.