Skip to content

Commit

Permalink
LOCALEDIR is used by EXIV2_ENABLE_BUILD_PO so make sure it is defined
Browse files Browse the repository at this point in the history
Otherwise it is possible to install translations in / if EXIV2_ENABLE_NLS=OFF.
  • Loading branch information
a17r committed Aug 20, 2017
1 parent 106e35e commit 8476693
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions config/findDependencies.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@ if (EXIV2_ENABLE_XMP)
find_package(EXPAT REQUIRED)
endif (EXIV2_ENABLE_XMP)

if( NOT LOCALEDIR )
set( LOCALEDIR "${CMAKE_INSTALL_LOCALEDIR}" )
if( WIN32 )
STRING( REPLACE "/" "\\\\" LOCALEDIR ${LOCALEDIR} )
endif( WIN32 )
endif()

if( EXIV2_ENABLE_NLS )
find_package(Intl)
if(Intl_FOUND)
Expand All @@ -32,12 +39,6 @@ if( EXIV2_ENABLE_NLS )
else()
set(LIBINTL_LIBRARIES)
endif()
if( NOT LOCALEDIR )
set( LOCALEDIR "${CMAKE_INSTALL_LOCALEDIR}" )
if( WIN32 )
STRING( REPLACE "/" "\\\\" LOCALEDIR ${LOCALEDIR} )
endif( WIN32 )
endif( NOT LOCALEDIR )
add_definitions( -DEXV_LOCALEDIR="${LOCALEDIR}" )
set( ENABLE_NLS 1 )
# TODO : This is assuming that Intl is always found. This check should be improved and remove
Expand Down

0 comments on commit 8476693

Please sign in to comment.