Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Log4cxx in CMake

Tags:

c++

cmake

log4cxx

I try to use log4cxx in my project. I installed log4cxx:

sudo apt-get install liblog4cxx-dev

But, when I use CMakeLists.txt:

find_package(log4cxx)

It gives an error:

Could not find a package configuration file provided by "log4cxx" with any
of the following names:

log4cxxConfig.cmake
log4cxx-config.cmake

I think it is missing log4cxxConfig.cmake, but I don't know how to fix it.

like image 353
GAVD Avatar asked Feb 02 '26 00:02

GAVD


1 Answers

I think you need a file named "FindLog4cxx.cmake".

I found the following on at Kitware's GitHub repository: https://github.com/Kitware/vibrant/blob/master/CMake/FindLog4cxx.cmake

like image 94
geipel Avatar answered Feb 04 '26 15:02

geipel



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!