diff --git a/Python-Bindings/CMakeLists.txt b/Python-Bindings/CMakeLists.txt index e2e4d4d..a83d904 100644 --- a/Python-Bindings/CMakeLists.txt +++ b/Python-Bindings/CMakeLists.txt @@ -2,11 +2,11 @@ cmake_minimum_required(VERSION 3.10) project(topologic) set(CMAKE_CXX_STANDARD 17) -IF(MSVC) - list(APPEND CMAKE_PREFIX_PATH "./pybind") +IF(MSVC) find_package(PythonLibs REQUIRED) ENDIF(MSVC) +list(APPEND CMAKE_PREFIX_PATH "./pybind") find_package(pybind11 REQUIRED) include_directories(${PYTHON_INCLUDE_DIRS}) @@ -37,6 +37,9 @@ set(ADDITIONAL_LIBRARY_DEPENDENCIES IF(MSVC) SET_PROPERTY(TARGET TopologicCore PROPERTY IMPORTED_LOCATION ${CMAKE_CURRENT_LIST_DIR}/../output/${CMAKE_GENERATOR_PLATFORM}/${CMAKE_BUILD_TYPE}/TopologicCore.dll) SET_PROPERTY(TARGET TopologicCore PROPERTY IMPORTED_IMPLIB ${CMAKE_CURRENT_LIST_DIR}/../output/${CMAKE_GENERATOR_PLATFORM}/${CMAKE_BUILD_TYPE}/TopologicCore.lib) +else(MSVC) + find_library(TOPOLOGIC_CORE TopologicCore) + SET_PROPERTY(TARGET TopologicCore PROPERTY IMPORTED_LOCATION ${TOPOLOGIC_CORE}) ENDIF(MSVC) set(SRC_FILES diff --git a/Python-Bindings/src/WireUtility.Binding.cpp b/Python-Bindings/src/WireUtility.Binding.cpp index 1612422..6948175 100644 --- a/Python-Bindings/src/WireUtility.Binding.cpp +++ b/Python-Bindings/src/WireUtility.Binding.cpp @@ -41,7 +41,7 @@ void register_WireUtility_class(py::module& m) { [](const TopologicCore::Wire::Ptr& kpWire, const double kTolerance) { - WireUtility::RemoveCollinearEdges(kpWire, kTolerance); + return WireUtility::RemoveCollinearEdges(kpWire, kTolerance); }, " ", py::arg("kpWire"), py::arg("kTolerance")) ;