@@ -19,7 +19,7 @@ option(MYSQLPOOL_WITH_TESTS "Enable Tests" OFF)
19
19
option (MYSQLPOOL_WITH_INTGRATION_TESTS "Enable Integretion Tests" OFF )
20
20
option (MYSQLPOOL_WITH_EXAMPLES "Compile examples" OFF )
21
21
option (MYSQLPOOL_EMBEDDED "Do not try to install dependencies" OFF )
22
- option (MYSQLPOOL_BOOST_ALL "Find_Boost support COMPONENT" ON )
22
+ option (MYSQLPOOL_BOOST_ALL "Find_Boost support COMPONENT ALL " ON )
23
23
24
24
set (MYSQLPOOL_LOGGER "clog" CACHE STRING "Log system to use. One of 'clog', 'internal', 'logfault', 'boost' or 'none'" )
25
25
set (MYSQLPOOL_LOG_LEVEL_STR "info" CACHE STRING "Minimum log level to enable. One of 'none', error', 'warn', 'info', 'debug', 'trace'" )
@@ -74,7 +74,8 @@ if (MYSQLPOOL_LOG_WITH_INTERNAL_LOG)
74
74
endif ()
75
75
76
76
if (MYSQLPOOL_LOG_WITH_BOOST_LOG)
77
- set (BOOST_LOG_DEP Boost::log_setup Boost::log )
77
+ set (BOOST_LOG_DEP Boost::log )
78
+ set (BOOST_LOG_LIB log log_setup)
78
79
message (STATUS "Using Boost.Log for logging (brace for horrors!)" )
79
80
endif ()
80
81
@@ -119,24 +120,46 @@ if(NOT DEFINED USE_BOOST_VERSION)
119
120
set (USE_BOOST_VERSION 1.83)
120
121
endif ()
121
122
122
- if (MYSQLPOOL_BOOST_ALL)
123
- set (BOOST_ALL ALL )
124
- endif ()
125
-
126
- find_package (Boost ${USE_BOOST_VERSION} REQUIRED ${BOOST_ALL} )
127
-
128
- message ("Boost_LIBRARIES: ${Boost_LIBRARIES} " )
129
123
130
124
set (MYSQLPOOL_BOOST_LIBRARIES
131
125
${BOOST_LOG_DEP}
132
126
Boost::system
133
- Boost::date_time
134
- Boost::coroutine
135
127
Boost::context
136
128
Boost::chrono
137
129
Boost::json
138
130
)
139
131
132
+ set (MYSQLPOOL_BOOST_PROGRAM_OPTIONS Boost::program_options)
133
+
134
+ if (MYSQLPOOL_BOOST_ALL)
135
+ find_package (Boost ${USE_BOOST_VERSION} REQUIRED ALL )
136
+ else ()
137
+ find_package (Boost ${USE_BOOST_VERSION} REQUIRED COMPONENTS
138
+ system
139
+ context
140
+ chrono
141
+ json
142
+ program_options
143
+ ${BOOST_LOG_LIB}
144
+ )
145
+
146
+ if (Boost_VERSION VERSION_GREATER_EQUAL "1.85.0" )
147
+ find_package (Boost ${USE_BOOST_VERSION} REQUIRED COMPONENTS
148
+ system
149
+ context
150
+ chrono
151
+ json
152
+ charconv
153
+ program_options
154
+ ${BOOST_LOG_LIB}
155
+ )
156
+ set (MYSQLPOOL_BOOST_PROGRAM_OPTIONS ${MYSQLPOOL_BOOST_PROGRAM_OPTIONS} Boost::charconv)
157
+ endif ()
158
+ endif ()
159
+
160
+ message ("Boost_LIBRARIES: ${Boost_LIBRARIES} " )
161
+ message (MYSQLPOOL_BOOST_LIBRARIES: ${MYSQLPOOL_BOOST_LIBRARIES} )
162
+
140
163
if (Boost_VERSION VERSION_GREATER "1.84.0" )
141
164
set (MYSQLPOOL_BOOST_LIBRARIES ${MYSQLPOOL_BOOST_LIBRARIES} Boost::charconv)
142
165
endif ()
0 commit comments