syscall_intercept icon indicating copy to clipboard operation
syscall_intercept copied to clipboard

fix CMakeLists.txt bug

Open Kirhhoff opened this issue 2 years ago • 3 comments

Lookup path of version map: ${CMAKE_SOURCE_DIR} -> ${CMAKE_CURRRENT_SOURCE_DIR}

This leads to version map lookup fail if syscall_intercept is embedded within another cmake-based project.

Kirhhoff avatar Jul 01 '23 09:07 Kirhhoff

I just put syscall_intercept under ${project}/lib/syscall_intercept, and add "lib/syscall_intercept" as a subdirectory of my project. Run cmake and it told me version map not found. It turns out ${CMAKE_SOURCE_DIR} is evaluated to ${project}, while ${CMAKE_CURRENT_SOURCE_DIR} can be properly evaluated to ${project}/lib/syscall_intercept.

Kirhhoff avatar Jul 01 '23 09:07 Kirhhoff

Why did you close this? It seems valid.

en4bz avatar Jul 11 '23 18:07 en4bz

Sorry, because after read the README again, I felt not sure whether this lib is intended to be embedded directly within another cmake project. Generally when I want to use a cmake lib I just clone it and write a "add_subdirectory" in my CMakeLists.txt. Under most circumstance this will just work, so for a cmake lib I actually rarely read its README...😂. After reading the README, its detailed instruction about how to set the lib up, I thought maybe I made a mistake?😖

Kirhhoff avatar Jul 13 '23 01:07 Kirhhoff