How do I use this in my project? (how do cmake?) #89
-
|
I'm using cmake already but I know very little about it. I don't understand what I need to add to my CMakeLists.txt to be able to use qlib. So far I have: but this fails because Without the Here's the entire CMakeLists.txt, there are probably several more problems: |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Please follow the Setup and Installation. Also, 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. |
Beta Was this translation helpful? Give feedback.
Please follow the Setup and Installation.
Also,
q_libis header-only, so you should not create your ownQtarget fromQ_sources. Just fetch the project and link your executable againstlibq.For example:
I cannot provide a full CMake tutorial here, but the snippet above should point you in the right direction.