Skip to content

Commit dd3fcfa

Browse files
authored
Merge pull request #971 from Exiv2/mergify/bp/master/pr-967
fix_966_macosx_libintl_mono_framework (bp #967)
2 parents 6562aee + 076585d commit dd3fcfa

File tree

3 files changed

+20
-14
lines changed

3 files changed

+20
-14
lines changed

CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ option( BUILD_SHARED_LIBS "Build exiv2lib as a shared library"
1313
option( EXIV2_ENABLE_XMP "Build with XMP metadata support" ON )
1414
option( EXIV2_ENABLE_EXTERNAL_XMP "Use external version of XMP" OFF )
1515
option( EXIV2_ENABLE_PNG "Build with png support (requires libz)" ON )
16-
cmake_dependent_option(EXIV2_ENABLE_NLS "Build native language support (requires gettext)" ON "UNIX" OFF)
16+
option( EXIV2_ENABLE_NLS "Build native language support (requires gettext)" OFF )
1717
option( EXIV2_ENABLE_PRINTUCS2 "Build with Printucs2" ON )
1818
option( EXIV2_ENABLE_LENSDATA "Build including lens data" ON )
1919
option( EXIV2_ENABLE_DYNAMIC_RUNTIME "Use dynamic runtime (used for static libs)" ON )
@@ -22,7 +22,6 @@ option( EXIV2_ENABLE_WEBREADY "Build webready support into library"
2222
option( EXIV2_ENABLE_CURL "USE Libcurl for HttpIo (WEBREADY)" OFF )
2323

2424
option( EXIV2_BUILD_SAMPLES "Build sample applications" ON )
25-
option( EXIV2_BUILD_PO "Build translations files" OFF )
2625
option( EXIV2_BUILD_EXIV2_COMMAND "Build exiv2 command-line executable" ON )
2726
option( EXIV2_BUILD_UNIT_TESTS "Build unit tests" OFF )
2827
option( EXIV2_BUILD_FUZZ_TESTS "Build fuzz tests (libFuzzer)" OFF )
@@ -103,7 +102,7 @@ if( EXIV2_BUILD_SAMPLES )
103102
add_dependencies(tests exiv2lib exiv2 ${SAMPLES})
104103
endif()
105104

106-
if( EXIV2_BUILD_PO )
105+
if( EXIV2_ENABLE_NLS )
107106
add_subdirectory( po )
108107
endif()
109108

README.md

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -136,20 +136,22 @@ $ cmake -DBUILD_SHARED_LIBS=On -DEXIV2_ENABLE_NLS=OFF
136136

137137
### 2.4 Dependencies
138138

139-
The following Exiv2 features are enabled by default and require external libraries. You can disable the dependency with CMake options:
139+
The following Exiv2 features require external libraries:
140140

141-
| Feature | Package | cmake option to disable | Availability |
142-
|:-------------------------- |:-------- |:---------------------------- |:----------- |
143-
| PNG image support | zlib | -DEXIV2\_ENABLE\_PNG=Off | [http://zlib.net/](http://zlib.net/) |
144-
| Native language support | gettext | -DEXIV2\_ENABLE\_NLS=Off | [http://www.gnu.org/software/gettext/](http://www.gnu.org/software/gettext/) |
145-
| XMP support | expat | -DEXIV2\_ENABLE\_XMP=Off | [http://expat.sourceforge.net](http://expat.sourceforge.net)/<br/>Use _**Expat 2.2.6**_ and later |
141+
| Feature | Package | Default | To change default | Availability |
142+
|:-------------------------- |:-------- |:--------:| :---------------------------- |:----------- |
143+
| PNG image support | zlib | ON | -DEXIV2\_ENABLE\_PNG=Off | [http://zlib.net/](http://zlib.net/) |
144+
| XMP support | expat | ON | -DEXIV2\_ENABLE\_XMP=Off | [http://expat.sourceforge.net](http://expat.sourceforge.net)/<br/>Use _**Expat 2.2.6**_ and later |
145+
| Natural language system | gettext | OFF | -DEXIV2\_ENABLE\_NLS=On | [http://www.gnu.org/software/gettext/](http://www.gnu.org/software/gettext/) |
146146

147147
On UNIX systems, you may install the dependencies using the distribution's package management system. Install the
148148
development package of a dependency to install the header files and libraries required to build Exiv2. In the file
149149
`ci/install_dependencies.sh` you can check to the list of packages we install on different Linux distributions. This
150150
file is used to setup some CI images in which we try out the Exiv2 compilation.
151151

152-
Notes about different platforms are included in this document: [Platform Notes](#5)
152+
Natural language system is discussed in more detail here: [Localisation](#2-8)
153+
154+
Notes about different platforms are included here: [Platform Notes](#5)
153155

154156
You may choose to install dependences with conan. This is supported on all platforms and is especially useful for users of Visual Studio.
155157
See [README-CONAN](README-CONAN.md) for more information.
@@ -216,7 +218,6 @@ $
216218

217219
This [repository](https://github.com/piponazo/exiv2Consumer) shows an example of how to consume Exiv2 with CMake.
218220

219-
220221
[TOC](#TOC)
221222
<div id="2-7">
222223

@@ -249,7 +250,9 @@ g++ -std=c++98 myprogram.cpp -o myprogram $(pkg-config exiv2 --libs --cflags)
249250

250251
Localisation is supported on a UNIX-like platform: Linux, MacOS-X, Cygwin and MinGW/msys2. Localisation is not supported for Visual Studio builds.
251252

252-
To build localisation support, use the CMake option `-DEXIV2_BUILD_PO=ON`. There are no additional build steps as the normal build commands will compile the library, samples and localisation support. You must install the build to ensure the localisation messages files can be found at run-time.
253+
To build localisation support, use the CMake option `-DEXIV2_ENABLE_NLS=ON`. You must install the `gettext` package with your package manager or from source. The `gettext` package is available from [http://www.gnu.org/software/gettext/](http://www.gnu.org/software/gettext/) and includes the library `libintl` and utilities to build localisation files. If CMake produces error messages which mention libintl or gettext, you should verify that the package `gettext` has been correctly built and installed.
254+
255+
You must install the build to test localisation. This ensures that the localisation message files can be found at run-time. You cannot test localisation in the directory `build\bin`.
253256

254257
1) Running exiv2 in another language
255258

@@ -894,4 +897,4 @@ FreeBSD uses pkg as the package manager. You should install the dependency expa
894897
895898
Written by Robin Mills
896899
897-
Revised: 2019-05-11
900+
Revised: 2019-07-29

cmake/findDependencies.cmake

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
# set include path for FindXXX.cmake files
22
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake/")
33

4+
# don't use Frameworks on the Mac (#966)
5+
if (APPLE)
6+
set(CMAKE_FIND_FRAMEWORK NEVER)
7+
endif()
8+
49
# Check if the conan file exist to find the dependencies
510
if (EXISTS ${CMAKE_BINARY_DIR}/conanbuildinfo.cmake)
611
set(USING_CONAN ON)
@@ -35,7 +40,6 @@ else()
3540
endif ()
3641
endif()
3742

38-
3943
if (EXIV2_ENABLE_NLS)
4044
find_package(Intl REQUIRED)
4145
endif( )

0 commit comments

Comments
 (0)