Mercurial > irccd
comparison CMakeLists.txt @ 1110:8c53096eef1e
cmake: add pkg-config file support
author | David Demelier <markand@malikania.fr> |
---|---|
date | Wed, 20 Oct 2021 16:02:13 +0200 |
parents | 251976043986 |
children | 337b6eb1fa19 |
comparison
equal
deleted
inserted
replaced
1109:251976043986 | 1110:8c53096eef1e |
---|---|
50 | 50 |
51 if (CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") | 51 if (CMAKE_C_COMPILER_ID MATCHES "GNU|Clang") |
52 set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic ${CMAKE_C_FLAGS}") | 52 set(CMAKE_C_FLAGS "-Wall -Wextra -pedantic ${CMAKE_C_FLAGS}") |
53 endif () | 53 endif () |
54 | 54 |
55 include(GNUInstallDirs) | |
56 | |
55 option(IRCCD_WITH_EXAMPLES "Enable example files" On) | 57 option(IRCCD_WITH_EXAMPLES "Enable example files" On) |
56 option(IRCCD_WITH_JS "Enable Javascript" On) | 58 option(IRCCD_WITH_JS "Enable Javascript" On) |
57 option(IRCCD_WITH_MAN "Enable manual pages" On) | 59 option(IRCCD_WITH_MAN "Enable manual pages" On) |
58 option(IRCCD_WITH_SSL "Enable SSL (requires OpenSSL)" On) | 60 option(IRCCD_WITH_SSL "Enable SSL (requires OpenSSL)" On) |
59 option(IRCCD_WITH_TESTS "Enable unit tests" On) | 61 option(IRCCD_WITH_TESTS "Enable unit tests" On) |
62 option(IRCCD_WITH_PKGCONFIG "Enable installation of pkg-config file" On) | |
60 | 63 |
61 set(IRCCD_WITH_UID "irccd" CACHE STRING "Default uid to run irccd as") | 64 set(IRCCD_WITH_UID "irccd" CACHE STRING "Default uid to run irccd as") |
62 set(IRCCD_WITH_GID "irccd" CACHE STRING "Default gid to run irccd as") | 65 set(IRCCD_WITH_GID "irccd" CACHE STRING "Default gid to run irccd as") |
66 set(IRCCD_WITH_PKGCONFIGDIR "${CMAKE_INSTALL_LIBDIR}/pkgconfig" | |
67 CACHE STRING "Directory for pkg-config files") | |
63 | 68 |
64 # Check presence of POSIX m library | 69 # Check presence of POSIX m library |
65 find_library(M_LIBRARY m libm) | 70 find_library(M_LIBRARY m libm) |
66 | |
67 include(GNUInstallDirs) | |
68 | 71 |
69 include(cmake/IrccdDefinePlugin.cmake) | 72 include(cmake/IrccdDefinePlugin.cmake) |
70 | 73 |
71 if (IRCCD_WITH_SSL) | 74 if (IRCCD_WITH_SSL) |
72 find_package(OpenSSL REQUIRED) | 75 find_package(OpenSSL REQUIRED) |