When using O2 as a sub-project of a larger CMake project, the directory CMAKE_SOURCE_DIR points to the parent project instead to the O2 directory. CMAKE_CURRENT_LIST_DIR points to the directory of the currently processed CMakeLists.txt file.
Not sure whether CMAKE_BINARY_DIR in the following install() line should also be replaced by CMAKE_CURRENT_BINARY_DIR. Probably yes.
When using O2 as a sub-project of a larger CMake project, the directory
CMAKE_SOURCE_DIR
points to the parent project instead to the O2 directory.CMAKE_CURRENT_LIST_DIR
points to the directory of the currently processedCMakeLists.txt
file.Not sure whether
CMAKE_BINARY_DIR
in the followinginstall()
line should also be replaced byCMAKE_CURRENT_BINARY_DIR
. Probably yes.