We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
At line 46 in top level CMakeLists.txt file, CMAKE_SOURCE_DIR is used as the source path when installing include directory.
CMAKE_SOURCE_DIR
install(DIRECTORY "${CMAKE_SOURCE_DIR}/include/" DESTINATION "include/${PROJECT_NAME}")
However, this may cause error if this package is used as a submodule of another CMake project, such as
- Other Prj - TOP CMakeLists.txt - PSOPT - CMakeLists.txt for PSOPT
In that case, CMAKE_SOURCE_DIR would be <Other Prj> instead of <Other Prj>/PSOPT.
<Other Prj>
<Other Prj>/PSOPT
Use CMAKE_CURRENT_SOURCE_DIR instead of CMAKE_SOURCE_DIR could be one way to fix this.
CMAKE_CURRENT_SOURCE_DIR
The text was updated successfully, but these errors were encountered:
No branches or pull requests
At line 46 in top level CMakeLists.txt file,
CMAKE_SOURCE_DIR
is used as the source path when installing include directory.However, this may cause error if this package is used as a submodule of another CMake project, such as
In that case,
CMAKE_SOURCE_DIR
would be<Other Prj>
instead of<Other Prj>/PSOPT
.Use
CMAKE_CURRENT_SOURCE_DIR
instead ofCMAKE_SOURCE_DIR
could be one way to fix this.The text was updated successfully, but these errors were encountered: