瀏覽代碼

Merge pull request #689 from Gjacquenot/master

Fixed Python CMakeLists.txt for CMake 3.10.0

Former-commit-id: c9310ff821a5d4c1d41df56aa14287d3be9ff68c
Jérémie Dumas 7 年之前
父節點
當前提交
c1a8e7d9ac
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      python/CMakeLists.txt

+ 2 - 2
python/CMakeLists.txt

@@ -126,7 +126,7 @@ if(WIN32)
   # Link against the Python shared library
   # Link against the Python shared library
   # message(FATAL_ERROR ${PYTHON_LIBRARY})
   # message(FATAL_ERROR ${PYTHON_LIBRARY})
   # target_link_libraries(igl ${PYTHON_LIBRARY})
   # target_link_libraries(igl ${PYTHON_LIBRARY})
-  target_link_libraries(pyigl ${PYTHON_LIBRARIES})
+  target_link_libraries(pyigl PRIVATE ${PYTHON_LIBRARIES})
 
 
 elseif(UNIX)
 elseif(UNIX)
   # It's quite common to have multiple copies of the same Python version
   # It's quite common to have multiple copies of the same Python version
@@ -161,7 +161,7 @@ elseif(UNIX)
   else()
   else()
 
 
     if(CHECK_UNDEFINED)
     if(CHECK_UNDEFINED)
-      target_link_libraries(pyigl ${PYTHON_LIBRARIES})
+      target_link_libraries(pyigl PRIVATE ${PYTHON_LIBRARIES})
       set_target_properties(pyigl PROPERTIES LINK_FLAGS "-Wl,--no-undefined")
       set_target_properties(pyigl PROPERTIES LINK_FLAGS "-Wl,--no-undefined")
     endif()
     endif()