From 085bfd83d7252c890854f04df357641a525246b1 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Mon, 9 Sep 2013 16:02:32 +0000 Subject: [PATCH] From Wang Rui, "The Python header will look for its libraries using "#pragma comment(lib,"python32_d.lib")" for MSVC. So user-specified libraries will not really be set for the osgdb_python plugin. This small fix may help locate the Python libraries after putting the CMakeLists.txt into src/osgPlugins/python " --- src/osgPlugins/python/CMakeLists.txt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/osgPlugins/python/CMakeLists.txt b/src/osgPlugins/python/CMakeLists.txt index 9a3fcf680..6041c271c 100644 --- a/src/osgPlugins/python/CMakeLists.txt +++ b/src/osgPlugins/python/CMakeLists.txt @@ -9,5 +9,10 @@ SET(TARGET_SRC SET(TARGET_EXTERNAL_LIBRARIES ${TARGET_EXTERNAL_LIBRARIES} ${PYTHON_LIBRARY}) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIR} ) +IF(MSVC) + GET_FILENAME_COMPONENT(PYTHON_LIB_DIR ${PYTHON_LIBRARY} PATH) + LINK_DIRECTORIES(${PYTHON_LIB_DIR}) +ENDIF(MSVC) + #### end var setup ### SETUP_PLUGIN(python)