Skip to content

Commit cba4443

Browse files
authored
Merge pull request #89 from sy-c/master
v2.6.0
2 parents 0942762 + db32c59 commit cba4443

File tree

2 files changed

+17
-9
lines changed

2 files changed

+17
-9
lines changed

CMakeLists.txt

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ add_subdirectory(doc)
4545
#find_package(Common REQUIRED)
4646
find_package(Boost REQUIRED)
4747
find_package(MySQL)
48-
find_package(SWIG 3.0.12)
48+
find_package(SWIG 4.2.0)
4949

5050
# flag to build only client library
5151
#set(INFOLOGGER_BUILD_LIBONLY 1)
@@ -295,7 +295,7 @@ target_link_libraries(
295295

296296
# generate libraries for other languages with SWIG
297297
if(SWIG_FOUND)
298-
include(${SWIG_USE_FILE})
298+
include (UseSWIG)
299299
message("Generating extra languages libraries with SWIG")
300300

301301
set_property(SOURCE src/infoLogger.i PROPERTY CPLUSPLUS ON)
@@ -318,15 +318,20 @@ if(SWIG_FOUND)
318318
endif()
319319

320320
# library for Python
321-
find_package(PythonLibs)
322-
if (PYTHONLIBS_FOUND)
321+
find_package(Python3 COMPONENTS Interpreter Development)
322+
if (PYTHON3_FOUND)
323323
message("Bindings for Python will be generated")
324+
#message("Python_FOUND:${Python3_FOUND}")
325+
#message("Python_VERSION:${Python3_VERSION}")
326+
#message("Python_Development_FOUND:${Python3_Development_FOUND}")
327+
#message("Python_LIBRARIES:${Python3_LIBRARIES}")
328+
#message("Python include: ${Python3_INCLUDE_DIRS}")
324329
set(CMAKE_SWIG_FLAGS -module infoLoggerForPython)
325-
swig_add_library(infoLoggerForPython LANGUAGE python SOURCES src/infoLogger.i ${INFOLOGGER_LIB_OBJECTS})
326-
target_include_directories(${SWIG_MODULE_infoLoggerForPython_REAL_NAME} PRIVATE ${INFOLOGGER_INCLUDE_DIRS} ${PYTHON_INCLUDE_PATH})
327-
target_link_libraries(${SWIG_MODULE_infoLoggerForPython_REAL_NAME} ${PYTHON_LIBRARIES})
328-
message("linking with ${PYTHON_LIBRARIES}")
329-
set_target_properties(${SWIG_MODULE_infoLoggerForPython_REAL_NAME} PROPERTIES OUTPUT_NAME _infoLoggerForPython)
330+
swig_add_library(infoLoggerForPython LANGUAGE python SOURCES src/infoLogger.i ${INFOLOGGER_LIB_OBJECTS})
331+
target_include_directories(${SWIG_MODULE_infoLoggerForPython_REAL_NAME} PRIVATE ${INFOLOGGER_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS})
332+
target_link_libraries(${SWIG_MODULE_infoLoggerForPython_REAL_NAME} ${Python3_LIBRARIES})
333+
message("linking with ${Python3_LIBRARIES}")
334+
#set_target_properties(${SWIG_MODULE_infoLoggerForPython_REAL_NAME} PROPERTIES OUTPUT_NAME _infoLoggerForPython)
330335
install(TARGETS ${SWIG_MODULE_infoLoggerForPython_REAL_NAME} DESTINATION ${CMAKE_INSTALL_LIBDIR})
331336
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/infoLoggerForPython.py DESTINATION ${CMAKE_INSTALL_LIBDIR})
332337
endif()

doc/releaseNotes.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,3 +138,6 @@ This file describes the main feature changes for each InfoLogger released versio
138138

139139
## v2.5.4 - 09/10/2023
140140
- Updated InfoLoggerFMQ.hxx with new FMQ severities.
141+
142+
## v2.6.0 - 24/01/2024
143+
- Updated SWIG version requirement to allow generation of Python3 bindings.

0 commit comments

Comments
 (0)