Skip to content

Use keyword signature in CMakeLists #12

@lynzrand

Description

@lynzrand

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions