@@ -11,20 +11,10 @@ include(CheckCXXSymbolExists)
11
11
check_include_file_cxx (clocale HAVE_CLOCALE )
12
12
check_cxx_symbol_exists (localeconv clocale HAVE_LOCALECONV )
13
13
14
- if (CMAKE_VERSION VERSION_LESS 3.0.0 )
15
- # The "LANGUAGE CXX" parameter is not supported in CMake versions below 3,
16
- # so the C compiler and header has to be used.
17
- check_include_file (locale.h HAVE_LOCALE_H )
18
- set (CMAKE_EXTRA_INCLUDE_FILES locale.h )
19
- check_type_size ("struct lconv" LCONV_SIZE )
20
- unset (CMAKE_EXTRA_INCLUDE_FILES )
21
- check_struct_has_member ("struct lconv" decimal_point locale.h HAVE_DECIMAL_POINT )
22
- else ()
23
- set (CMAKE_EXTRA_INCLUDE_FILES clocale )
24
- check_type_size (lconv LCONV_SIZE LANGUAGE CXX )
25
- unset (CMAKE_EXTRA_INCLUDE_FILES )
26
- check_struct_has_member (lconv decimal_point clocale HAVE_DECIMAL_POINT LANGUAGE CXX )
27
- endif ()
14
+ set (CMAKE_EXTRA_INCLUDE_FILES clocale )
15
+ check_type_size (lconv LCONV_SIZE LANGUAGE CXX )
16
+ unset (CMAKE_EXTRA_INCLUDE_FILES )
17
+ check_struct_has_member (lconv decimal_point clocale HAVE_DECIMAL_POINT LANGUAGE CXX )
28
18
29
19
if (NOT (HAVE_CLOCALE AND HAVE_LCONV_SIZE AND HAVE_DECIMAL_POINT AND HAVE_LOCALECONV ))
30
20
message (WARNING "Locale functionality is not supported" )
@@ -139,13 +129,11 @@ if(BUILD_SHARED_LIBS)
139
129
140
130
target_compile_features (${SHARED_LIB} PUBLIC ${REQUIRED_FEATURES} )
141
131
142
- if (NOT CMAKE_VERSION VERSION_LESS 2.8.11 )
143
- target_include_directories (${SHARED_LIB} PUBLIC
144
- $< INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} >
145
- $< BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR} /${JSONCPP_INCLUDE_DIR} >
146
- $< BUILD_INTERFACE:${PROJECT_BINARY_DIR} /include/json>
147
- )
148
- endif ()
132
+ target_include_directories (${SHARED_LIB} PUBLIC
133
+ $< INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} >
134
+ $< BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR} /${JSONCPP_INCLUDE_DIR} >
135
+ $< BUILD_INTERFACE:${PROJECT_BINARY_DIR} /include/json>
136
+ )
149
137
150
138
list (APPEND CMAKE_TARGETS ${SHARED_LIB} )
151
139
endif ()
@@ -175,13 +163,11 @@ if(BUILD_STATIC_LIBS)
175
163
176
164
target_compile_features (${STATIC_LIB} PUBLIC ${REQUIRED_FEATURES} )
177
165
178
- if (NOT CMAKE_VERSION VERSION_LESS 2.8.11 )
179
- target_include_directories (${STATIC_LIB} PUBLIC
180
- $< INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} >
181
- $< BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR} /${JSONCPP_INCLUDE_DIR} >
182
- $< BUILD_INTERFACE:${PROJECT_BINARY_DIR} /include/json>
183
- )
184
- endif ()
166
+ target_include_directories (${STATIC_LIB} PUBLIC
167
+ $< INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} >
168
+ $< BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR} /${JSONCPP_INCLUDE_DIR} >
169
+ $< BUILD_INTERFACE:${PROJECT_BINARY_DIR} /include/json>
170
+ )
185
171
186
172
list (APPEND CMAKE_TARGETS ${STATIC_LIB} )
187
173
endif ()
@@ -204,13 +190,11 @@ if(BUILD_OBJECT_LIBS)
204
190
205
191
target_compile_features (${OBJECT_LIB} PUBLIC ${REQUIRED_FEATURES} )
206
192
207
- if (NOT CMAKE_VERSION VERSION_LESS 2.8.11 )
208
- target_include_directories (${OBJECT_LIB} PUBLIC
209
- $< INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} >
210
- $< BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR} /${JSONCPP_INCLUDE_DIR} >
211
- $< BUILD_INTERFACE:${PROJECT_BINARY_DIR} /include/json>
212
- )
213
- endif ()
193
+ target_include_directories (${OBJECT_LIB} PUBLIC
194
+ $< INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} >
195
+ $< BUILD_INTERFACE:${CMAKE_CURRENT_LIST_DIR} /${JSONCPP_INCLUDE_DIR} >
196
+ $< BUILD_INTERFACE:${PROJECT_BINARY_DIR} /include/json>
197
+ )
214
198
215
199
list (APPEND CMAKE_TARGETS ${OBJECT_LIB} )
216
200
endif ()
0 commit comments