Commit Graph

57 Commits

Author SHA1 Message Date
Gabi Melman
f4204e05bd Clean cmake 2023-12-24 12:34:00 +02:00
Gabi Melman
90c5055b77 place dlls in the same directory as the executables on msvc 2023-12-24 12:28:02 +02:00
gabime
8a0f87406b Updated cmake messages 2023-12-23 17:16:24 +02:00
gabime
3fe640e270 Remove static lib enforement of fmt 2023-12-23 16:31:38 +02:00
Gabi Melman
ea66477ac0 Copy dlls to the executable folder for msvc 2023-12-23 16:28:36 +02:00
gabime
c6206a3191 Always build static fmtlib version and fix fpic 2023-12-23 14:03:13 +02:00
gabime
15ee3f7999 Updated spdlogConfig.cmake 2023-12-22 18:24:43 +02:00
gabime
d03d514bad Use fmt git hash and disable FMT_OS 2023-12-22 18:01:05 +02:00
Gabi Melman
f5c927b46e
Delete cmake/pch.h.in 2023-10-02 20:09:47 +03:00
gabime
a0e631802c Replaced include <spdlog/..> with include "spdlog/.." 2023-09-29 00:06:17 +03:00
Alexander Shpilkin
876880fb3f
Reflect CMAKE_INSTALL_INCLUDEDIR in pkg-config 2022-05-19 17:49:16 +03:00
Alexander Shpilkin
afb69071d5
Allow absolute CMAKE_INSTALL_LIBDIR 2022-05-19 17:48:57 +03:00
Adam Calhoon
69cac816aa When built with SPDLOG_FMT_EXTERNAL_HO consumers of the spdlog targets depend on fmt
The cmake/spdlogConfig.cmake.in file properly takes into account the fmt
package dependency when building with SPDLOG_FMT_EXTERNAL:BOOL=ON but
not when built with SPDLOG_FMT_EXTERNAL_HO:BOOL=ON.

Prior to these changes SPDLOG_FMT_EXTERNAL_HO:BOOL=ON results in
exported targets with INTERFACE_LINK_LIBRARIES that contain
fmt::fmt-header-only.

As such, the installed spdlogConfig.cmake file should attempt to find
that dependency for the consumer.
2022-03-06 11:04:59 -05:00
Dave Rigby
87095a9f1f Ensure exported package is relocatable
As per CMake's Importing and Exporting Guide[1],
configure_package_config_file() should be used for configuring the
package configuration file, not the regular configure_file() function.

This ensures that a spdlog package built on one system (with a given
directory tree) can be imported from a different system -
e.g. creating a pre-compiled spdlog package for use on different
systems.

[1]: https://cmake.org/cmake/help/git-stage/guide/importing-exporting/index.html#id8
2021-08-04 15:34:27 +01:00
gabime
e7e8b75a4c clang-format 2021-07-19 00:50:51 +03:00
gabime
3315bad009 Treat wall warnings as errors if SPDLOG_BUILD_WARNINGS is ON 2021-07-10 15:22:44 +03:00
gabime
0613dbc4a2 Revert pr #1860 2021-03-04 23:52:50 +02:00
Christof Kaufmann
365e470a32 Add CPack debian package settings 2020-10-20 19:57:56 +02:00
Konstantin Podsvirov
fe97a03033 Fix shared library building failure on Windows with non MSVC
For example, now we can built shared library on Window with MinGW.

This changes improve features added in #1467.
2020-06-10 22:56:53 +03:00
gabime
75c15e8028 Formatted cmake 2020-05-02 11:42:08 +03:00
gabime
22655d7554 Formatted cmake using cmake-format 2020-05-02 11:39:59 +03:00
gabime
ff0e430e46 Formatted cmake using cmake-format 2020-05-02 11:38:14 +03:00
Bruce Mitchener
937fe7e909 cmake: Fix tabs, whitespace at EOL. 2020-05-02 07:17:15 +07:00
Bruce Mitchener
559984b2fe Fix typos. 2020-05-01 08:54:16 +07:00
gabime
6440733002 Fixed cmake 2020-04-10 15:51:34 +03:00
gabime
02802af97f Renamed SPDLOG_ENABLE_WARNINGS to SPDLOG_BUILD_WARNINGS 2020-04-10 15:38:33 +03:00
FIlip Demski
132ec0a5fc Added an option to disable compiler warnings 2020-04-03 10:09:29 +02:00
Trond H Emaus
3e4df86ac0 create MSVC_OPTIONS list only if compiler is msvc 2020-03-28 10:26:32 +01:00
Trond H Emaus
7054cf7a35 replace MSVC_OPTIONS variable as list 2020-03-28 00:03:59 +01:00
Trond H Emaus
2a7fc9e30e add /WX mscv compiler option for only mscv compiler
clang on windows support both gcc and mscv style options. Clang.exe on windows
defaults to gcc style, which will result in /WX unknown compiler command.
This will set /WX if and only if the compiler is MSVC and greater than version 1900
2020-03-27 19:59:22 +01:00
Gabi Melman
d43a17304e
Merge pull request #1484 from OlivierLDff/pch-support
Support for precompiled headers with SPDLOG_ENABLE_PCH
2020-03-21 17:51:50 +02:00
Olivier LDff
21d41b8e81 Support for precompiled header for static & dynamic spdlog compilation.
Compilation is shorten by 2 on windows with msvc. Some improvement for gcc and appleclang. Add SPDLOG_ENABLE_PCH option to CMake that is defaulted to ON. This will enable precompiled header by default if supported. It can be disable if user have a conflict of any kind. Or to check that project is still compiling with CMake version that do not support precompiled header.
2020-03-21 15:36:14 +01:00
Gabi Melman
ee54f54ced Use /W3 for mvsc 2020-03-20 13:56:54 +02:00
Gabi Melman
b4a1b4b59a Updated verion.rc and CMakeLists.txt for dll build 2020-03-12 14:35:30 +02:00
Gabi Melman
b309a88bea Update utils.cmake 2020-03-12 14:29:39 +02:00
Gabi Melman
e88bee49a6 Added version info to dll build 2020-03-12 14:29:23 +02:00
Craig Tyler
e47ecc1828 Updates supporting CPack RPM generation
Enable command line overrides of default settings
* CPACK_GENERATOR
* CPACK_PACKAGE_RELOCATABLE

Enables command line setting of generated RPM version attributes
* CPACK_RPM_PACKAGE_RELEASE
* CPACK_RPM_PACKAGE_ARCHITECTURE

Adds dependency on pkgconfig RPM when not generating relocatable RPM
2020-02-20 14:52:56 -08:00
gabime
3a258ee5c9 Fix CMakeList for older versions of CMake 2019-12-08 14:14:57 +02:00
gabime
afb949a417 CMake: - Allow non fatal security wanrnings for msvc 2015 and below 2019-12-05 17:44:38 +02:00
gabime
fb70eca0a3 CmakeLists.txt: add -pthread to pkg-config 2019-10-04 21:56:17 +03:00
gabime
cf2bf488a2 CmakeLists.txt: Fixed package config generation 2019-10-04 21:49:20 +03:00
Craig Tyler
8627721533 Set additional CPACK variables for RPM generator
Sets the following when querying the generated RPM's info:

Group       : System Environment/Libraries
License     : MIT
URL         : https://github.com/gabime/spdlog
Summary     : Fast C++ logging library
Description :
Very fast, header-only/compiled, C++ logging library.
2019-09-27 09:40:09 -07:00
orbea
588910129c cmake: Add a new spdlog.pc pkgconfig file.
Fixes https://github.com/gabime/spdlog/issues/1237.
2019-09-22 19:04:29 -07:00
gabime
45a18a61c6 CmakeLists.txt: Added version-number and debug suffixes + SPDLOG_BUILD_SHARED property 2019-09-08 00:42:23 +03:00
gabime
8afe18f148 Minor improvement CMakeLists to use generators 2019-06-10 20:10:28 +03:00
gabime
8d3d06b7a0 Fixed version extraction in CMake 2019-06-10 19:53:39 +03:00
gabime
cf64f2baca Fixed CMake address sanitizer 2019-06-10 18:32:10 +03:00
gabime
68a0193d95 CMake refactoring to functions 2019-06-10 18:09:36 +03:00
gabime
5743adc467 CMake use extract version from version.h 2019-05-29 15:15:35 +03:00
gabime
d439f75491 Minor CMake cosmetic fix 2019-05-29 00:17:38 +03:00