Skip to content
Discussion options

You must be logged in to vote

Please follow the Setup and Installation.

Also, q_lib is header-only, so you should not create your own Q target from Q_sources. Just fetch the project and link your executable against libq.

For example:

include(FetchContent)

set(Q_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
set(Q_BUILD_TEST OFF CACHE BOOL "" FORCE)
set(Q_BUILD_IO OFF CACHE BOOL "" FORCE)

FetchContent_Declare(
  q
  GIT_REPOSITORY https://github.com/cycfi/q.git
  GIT_TAG master
  GIT_SUBMODULES_RECURSE ON
)
FetchContent_MakeAvailable(q)

add_executable(my_app main.cpp)
target_link_libraries(my_app PRIVATE libq)

I cannot provide a full CMake tutorial here, but the snippet above should point you in the right direction.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by RenaKunisaki
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants