File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,12 +28,24 @@ include(options)
2828include (cflags )
2929set (${PROJECT_NAME_UPPER} _CXX_FLAGS "${LEATHERMAN_CXX_FLAGS} " )
3030add_definitions (${LEATHERMAN_DEFINITIONS} )
31- add_definitions (-DLEATHERMAN_I18N )
31+
32+ if (LEATHERMAN_USE_LOCALES)
33+ add_definitions (-DLEATHERMAN_I18N )
34+ endif ()
35+
3236## Pull in helper macros for working with leatherman libraries
3337include (leatherman )
3438
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+
3547# 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} )
3749
3850# pthreads if you require the Boost.Thread component.
3951find_package (Threads )
Original file line number Diff line number Diff line change @@ -30,7 +30,7 @@ target_link_libraries(lib${PROJECT_NAME}_test
3030 ${CMAKE_THREAD_LIBS_INIT}
3131)
3232
33- if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND BOOST_STATIC)
33+ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin" AND BOOST_STATIC AND LEATHERMAN_USE_LOCALES )
3434 target_link_libraries (lib${PROJECT_NAME}_test iconv )
3535endif ()
3636
You can’t perform that action at this time.
0 commit comments