Closed xunge closed 4 years ago
Hey, thanks.
To be able to link to TabToolbar, you should first point to the directory that contains FindTabToolbar.cmake
, then setup cmake variable TabToolbar_ROOT
to point to the library's directory. You can do that via cmake gui. After that you can successfully link to this library and add its include directory to the project.
Example of how to do that in cmake:
set(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake-modules") # this dir should contain FindTabToolbar.cmake file that will be used to find the library and define helper variables such as include dirs and path to binary for linking
find_package(TabToolbar REQUIRED) # if TabToolbar will not be found in default search dirs, you can set TabToolbar_ROOT variable in cmake gui or via command line argument to cmake
include_directories(${TabToolbar_INCLUDE_DIR})
target_link_libraries(%YourProjectName%
${TabToolbar_LIBRARY})
Hi, thank you for your reply. I follow your description but still have some problems.
Actrally, I have built the root project sucessfully and generated TabToolbar.dll
file use MingW. However when I compiled the example/Test
project still have an error about Could not find TabToolbar library
and can't find package.
I think maybe the TabToolbar library's path is wrong. I try to move TabToolbar.dll
to different directions but still have the same error.
What's more, can you tell me what's the OS and Compiler are recommended. I really want to build your project successfully. Thanks a lot~
Actually provided example project is built together with root project, but only if TT_BUILD_EXAMPLES
variable is set to true.
You can change that either via cmake gui or through command line parameter.
cmake -DTT_BUILD_EXAMPLES=TRUE .
I'm sorry, I still cannot find the TabToolbar library. You said I should setup cmake variable TabToolbar_ROOT to point to the library's directory, maybe I point to the wrong directory. Can you tell me?
Hi, @SeriousAlexej thanks for your perfect work. I am a new coder and I have built the Test project successfully use the command 'cmake .' However, when I open the 'sln' project, it have many errors like this 'cannot open src file 'TabToolbar/TabToolbar.h'. I think I should do something about the
cmake-modules/FindTabToolbar.cmake
to install some lib source? What should I do? Thanks~P.S. My computer OS is Win10, and use vs 2019 to compile.