File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change @@ -28,12 +28,24 @@ include(options)
28
28
include (cflags )
29
29
set (${PROJECT_NAME_UPPER} _CXX_FLAGS "${LEATHERMAN_CXX_FLAGS} " )
30
30
add_definitions (${LEATHERMAN_DEFINITIONS} )
31
- add_definitions (-DLEATHERMAN_I18N )
31
+
32
+ if (LEATHERMAN_USE_LOCALES )
33
+ add_definitions (-DLEATHERMAN_I18N )
34
+ endif ()
35
+
32
36
## Pull in helper macros for working with leatherman libraries
33
37
include (leatherman )
34
38
39
+ if (LEATHERMAN_USE_LOCALES )
40
+ set (BOOST_COMPONENTS locale )
41
+ else ()
42
+ set (BOOST_COMPONENTS regex )
43
+ endif ()
44
+
45
+ list (APPEND BOOST_COMPONENTS thread date_time chrono system program_options )
46
+
35
47
# Add other dependencies
36
- find_package (Boost 1.54 REQUIRED COMPONENTS locale thread date_time chrono system program_options )
48
+ find_package (Boost 1.54 REQUIRED COMPONENTS ${BOOST_COMPONENTS} )
37
49
38
50
# pthreads if you require the Boost.Thread component.
39
51
find_package (Threads )
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ target_link_libraries(lib${PROJECT_NAME}_test
30
30
${CMAKE_THREAD_LIBS_INIT}
31
31
)
32
32
33
- if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND BOOST_STATIC )
33
+ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND BOOST_STATIC AND LEATHERMAN_USE_LOCALES )
34
34
target_link_libraries (lib${PROJECT_NAME}_test iconv )
35
35
endif ()
36
36
You can’t perform that action at this time.
0 commit comments