Skip to content
New issue

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

Use keyword signature in CMakeLists #12

Open
lynzrand opened this issue Oct 31, 2021 · 1 comment
Open

Use keyword signature in CMakeLists #12

lynzrand opened this issue Oct 31, 2021 · 1 comment

Comments

@lynzrand
Copy link

CMake reported an error when compiling a project using this repository as a dependency:

CMake Error at include/quickjs/CMakeLists.txt:55 (target_link_libraries):
  The plain signature for target_link_libraries has already been used with
  the target "qjs".  All uses of target_link_libraries with a target must be
  either all-keyword or all-plain.

  The uses of the plain signature are here:

   * include/quickjs/CMakeLists.txt:51 (target_link_libraries)

It seems like the error was caused by this like in CMakeLists.txt, which uses the plain (no PUBLIC/PRIVATE) target_link_libraries statement.

target_link_libraries(qjs atomic)

Changing it to target_link_libraries(qjs PRIVATE atomic) seems to fix the problem.


Environment:

  • Arch Linux in WSL2 (5.10.60.1-microsoft-standard-WSL2)
  • CMake 3.21.3
  • GCC 11
@gengjiawen
Copy link
Contributor

Can you send a PR ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants