CMake Error at third-party/ClickHouse/clickhouse-cpp/cmake/version.cmake:26 (file):
file failed to open for reading (No such file or directory): /my_project/clickhouse/version.h
There is line in clickhouse's CMakeLists.txt : file(READ ${CMAKE_SOURCE_DIR}/clickhouse/version.h VERSION_FILE_DATA)
I try to add lib with FetchContent in my CMakeLists.txt
The problem is that because CMAKE_SOURCE_DIR reffers to root of my project, but clickhouse lib is contained in the folder third_party that is contained in root of my project.
So if i want to place clickhouse lib not directly in root there will be an error
Possible solution: Remove ${CMAKE_SOURCE_DIR} from path ${CMAKE_SOURCE_DIR}/clickhouse/version.h in file cmake/version.cmake or use ${CMAKE_CURRENT_SOURCE_DIR}
CMake Error at third-party/ClickHouse/clickhouse-cpp/cmake/version.cmake:26 (file): file failed to open for reading (No such file or directory): /my_project/clickhouse/version.h
There is line in clickhouse's CMakeLists.txt : file(READ ${CMAKE_SOURCE_DIR}/clickhouse/version.h VERSION_FILE_DATA) I try to add lib with FetchContent in my CMakeLists.txt The problem is that because CMAKE_SOURCE_DIR reffers to root of my project, but clickhouse lib is contained in the folder third_party that is contained in root of my project. So if i want to place clickhouse lib not directly in root there will be an error Possible solution: Remove ${CMAKE_SOURCE_DIR} from path ${CMAKE_SOURCE_DIR}/clickhouse/version.h in file cmake/version.cmake or use ${CMAKE_CURRENT_SOURCE_DIR}