Trying to compile dot11decrypt on debian, installed apt-get install libtins4.0
and apt-get install libtins-dev
, but cmake ..
can’t find package libtins, heres the error:
CMake Error at CMakeLists.txt:4 (FIND_PACKAGE):
By not providing "Findlibtins.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "libtins", but
CMake did not find one.
Could not find a package configuration file provided by "libtins" with any
of the following names:
libtinsConfig.cmake
libtins-config.cmake
Add the installation prefix of "libtins" to CMAKE_PREFIX_PATH or set
"libtins_DIR" to a directory containing one of the above files. If
"libtins" provides a separate development package or SDK, be sure it has
been installed.
-- Configuring incomplete, errors occurred!
See also "/home/user/dot11decrypt/build/CMakeFiles/CMakeOutput.log".
cat:dot11decrypt/CMakeLists.txt
1. CMAKE_MINIMUM_REQUIRED(VERSION 2.8.1)
2. PROJECT(dot11decrypt)
3.
4. FIND_PACKAGE(libtins REQUIRED)
5.
6. SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++0x")
7.
8. ADD_EXECUTABLE(dot11decrypt dot11decrypt.cpp)
9. TARGET_LINK_LIBRARIES(dot11decrypt ${LIBTINS_LIBRARIES} pthread)
find / -name Findlibtins.cmake
or libtinsConfig.cmake brings no result.
I found those files on internet but still no success, i think i have to install something but don’t know what.
2
Answers
I went with Tsyvarev solution.
Now cmake will reach dot11decrypt missing files.
Now you should have dot11decrypt executable.
If i would have to do it again i would try Alex Reinking solution first.
You don’t need to compile from source…
find_package
is a very flexible configuration point! You’ll just need to provide your own find module that is sufficient for the build. Fortunately, this is very simple. Here’s what I did:The key here is to create a minimal Find module. This is just two lines on my system since it isn’t meant to be reusable…
This just delegates the responsibility of setting the
LIBTINS_LIBRARIES
topkg-config
. To connect this find module to the build, I just set-DCMAKE_MODULE_PATH=$PWD/_patches
at the CMake configure command line.Also, you should definitely open a bug report with the
dot11decrypt
author about their broken and outdated build. Notice the strongly worded deprecation warning in the logs I posted.