alanxz / rabbitmq-c

RabbitMQ C client
MIT License
1.77k stars 671 forks source link

CMake install, win32 library name #354

Open aleksey-nikolaev opened 8 years ago

aleksey-nikolaev commented 8 years ago

In rabbitmq-c\librabbitmq\CMakeLists.txt (154) the library name concatenated with RMQ_SOVERSION this is the reason that the FindRabbitmqc.cmake:

FIND_LIBRARY(Rabbitmqc_LIBRARY
     NAMES rabbitmq
     HINTS ${Rabbitmqc_DIR}/lib
)

can`t find the rabbitmq.4.lib

If library name must contain version or some extended suffix/prefix text than install directory must have RabbitMQConfigure.cmake, like how OpenCV or Leptonica does for it`s custom named libraries, for example.

alanxz commented 8 years ago

Did you intend to file this in the alanxz/SimpleAmqpClient repository?

aleksey-nikolaev commented 8 years ago

Yes, I have in mind FindRabbitmqc.cmake in alanxz/SimpleAmqpClient repository. I used copy of FindRabbitmqc.cmake for load settings for an external project. But find_package did not find rabbitmq.lib on win32 and I had to hardcode rabbitmq.4.

Most external cmake projects have it`s own < name >Config.cmake files and it is best way, I think, because the developers of those projects can make a file names or path in package contents how they want.