9 Commits

Author SHA1 Message Date
Colin
929bf2de37 fix "icu-cu" -> "icu-uc" typo in cmake files (#468) 2025-10-09 15:03:39 +11:00
Dylan Baker
dcf3e1a551 Fix a number of packaging issues (#423)
* cmake: set PROJECT_DESCRIPTION and PROJECT_HOMEPAGE_URL after project()

Otherwise they are set to an empty string.

* cmake: set the pkg-config URL field

Since the information is already there to set it.

* cmake: use CMAKE_INSTALL_DATAROOTDIR if CMAKE_LIBRARY_ARCHITECTURE is unset

This causes files on NixOS to be put in the proper architecture
independent place, which otherwise was selecting the architecture
dependent location.

* cmake: Properly set pkg-config requires when configured with ICU

In this case the pkg-config file needs to set icu-cu in the `Required`
field, and needs to add the flag `-DCXXOPTS_USE_UNICODE` to the `Cflags`
field.

* cmake: cxxopts is not arch independent when built with ICU support

Since it links to an architecture dependent ICU
2024-03-08 15:47:28 +11:00
Alexander Kiselyov
a70771ae89 Fixed cmake install path in case of empty architecture (#322) 2022-06-16 07:34:14 +10:00
KOLANICH
5eca8a3001 Added CPack packaging, pkg-config and CMake version files. (#298) 2021-07-31 10:34:21 +10:00
RonxBulld
174510285a -Wsuggest-override is not supported by gcc before 5.0 (#283)
* -Wsuggest-override is not supported by gcc before 5.0

* GCC prior to 5.0 should ignore not only -Wnon-virtual-dtor but also -Weffc++, otherwise non-virtual destructor problems will still be reported.

* The `#pragma GCC diagnostic push' should be used before setting up the temporary environment.
2021-04-21 18:17:30 +10:00
Jarryd Beck
f34d603863 Fix missing override 2021-02-08 09:44:26 +11:00
Jarryd Beck
d10a9b5678 Upgrade GCC versions 2021-02-08 08:41:20 +11:00
jpr89
dc9a7728c0 Fixing cmake developer warning (#274)
Here is the warning currently being produced:

CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.19/Modules/GNUInstallDirs.cmake:223 (message):
Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
target architecture is known. Please enable at least one language before
including GNUInstallDirs.
Call Stack (most recent call first):

I noted how I fixed the error. This is caused by GNUInstallDirs automatically executing code just by including it.

I also added -Werror=dev to the CI to ensure this never happens again.

Co-authored-by: Juan Ramos <juanr0911@gmail.com>
2021-01-19 16:55:23 +11:00
jpr89
c55726ee29 Cmake Revamp (#270)
* Cmake Revamp

I needed to do a variety of things to ensure cxxopts worked well in my own project.

I created a new cmake module to abstract a lot of the logic in the main CMakelists.txt, I think it really assists in the readability of the project. Consequently a lot of logic is now written in functions.

I made a lot of the project options off by default unless the project is being built standalone. As a frequent consumer of cmake libraries this is a huge issue. Since examples, tests, installation, etc. aren't things I expect/desired by default when using libraries.

Co-authored-by: Juan Ramos <juanr0911@gmail.com>
2021-01-17 12:11:02 +11:00