Project

General

Profile

RE: Broken cmake support on windows? (trunk, r3883) ยป cmake-win-unicode.patch

Emmanuel d'Angelo, 22 Sep 2015 12:24

View differences:

CMakeLists.txt (copie de travail)
55 55
OPTION( EXIV2_ENABLE_WEBREADY      "Build webready support into library"                   OFF )
56 56
OPTION( EXIV2_ENABLE_CURL          "USE Libcurl for HttpIo"                                ON  )
57 57
OPTION( EXIV2_ENABLE_SSH           "USE Libssh for SshIo"                                  ON  )
58
OPTION( EXIV2_ENABLE_WIN_UNICODE   "Use Unicode paths (wstring) on Windows"                OFF )
58 59

  
59 60
IF( MINGW OR UNIX )
60 61
    IF ( CMAKE_CXX_COMPILER STREQUAL "g++" OR CMAKE_C_COMPILER STREQUAL "gcc" )
......
69 70
    ENDIF()
70 71
ENDIF( MINGW OR UNIX )
71 72

  
73
# Force unicode support on windows
74
IF (WIN32)
75
    IF( EXIV2_ENABLE_WIN_UNICODE )
76
        ADD_DEFINITIONS( -DEXV_UNICODE_PATH )
77
    ENDIF()
78
ENDIF()
79

  
72 80
INCLUDE_DIRECTORIES( ${CMAKE_SOURCE_DIR}/src/ ${CMAKE_SOURCE_DIR}/include/  ${CMAKE_SOURCE_DIR}/include/exiv2/)
73 81

  
74 82
if( MSVC )
config/config.h.in (copie de travail)
225 225
#define SEPARATOR_CHR '/'
226 226
#endif
227 227

  
228
/* Windows unicode path support */
229
#if defined WIN32 && !defined __CYGWIN__ && !defined __MINGW__
230
# define EXV_UNICODE_PATH
231
#endif
232

  
233 228
/* Symbol visibility support */
234 229
#ifdef WIN32
235 230
# define EXV_IMPORT __declspec(dllimport)
    (1-1/1)