File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -264,6 +264,21 @@ TARGET_LINK_LIBRARIES(mysqlcppconn-static ${MY_TARGET_LINK_LIBRARIES_STATIC}
264
264
${MYSQLCPPCONN_EXTRA_LIBRARIES}
265
265
${MYSQLCPPCONN_ICU_LIBRARY} )
266
266
267
+ IF (CMAKE_SYSTEM_NAME MATCHES "SunOS" )
268
+ # We pass objects from our C client library in the
269
+ # STATIC_LIBRARY_FLAGS property to create a
270
+ # "libmysqlcppconn-static.a" with both the C client library and
271
+ # Connector/C++ objects.
272
+ #
273
+ # In CMake 2.8.5 "SunPro-CXX.cmake" will define the creation of AR
274
+ # archives to use "CC -xar ..." but leave out LINK_FLAGS where
275
+ # the objects passed to STATIC_LIBRARY_FLAGS will end up. So no
276
+ # C client library objects will be in the resulting library.
277
+ #
278
+ # We set it the archive creation line to the default "ar cr ..."
279
+ SET (CMAKE_CXX_CREATE_STATIC_LIBRARY "<CMAKE_AR> cr <TARGET> <LINK_FLAGS> <OBJECTS>" )
280
+ ENDIF ()
281
+
267
282
SET_TARGET_PROPERTIES (mysqlcppconn-static PROPERTIES
268
283
LINK_FLAGS "${MYSQLCPPCONN_LINK_FLAGS_ENV} ${MYSQL_LINK_FLAGS} "
269
284
COMPILE_FLAGS "${MYSQLCPPCONN_COMPILE_FLAGS_ENV} ${MYSQL_CXXFLAGS} "
You can’t perform that action at this time.
0 commit comments