diff --git a/CMakeLists.txt b/CMakeLists.txt index 67cc95ff2..b8def5961 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -256,7 +256,7 @@ add_executable(all_tests tests/src/all_tests.cpp) target_link_libraries(all_tests PRIVATE ${PROJECT_NAME}_lib ${BOOST_LIB} test_fixtures ${LRT} ) if(PYTHON_INTERFACE) if (${PYTHONLIBS_FOUND}) -target_link_libraries(all_tests PUBLIC pybind11::embed) + target_link_libraries(all_tests PRIVATE pybind11::embed) endif() endif() @@ -270,7 +270,6 @@ if(PYTHON_INTERFACE) if (${PYTHONLIBS_FOUND}) #python interface set (PYTHON_SUPPORT ${PYTHON_LIBRARIES}) -target_link_libraries(${PROJECT_NAME}_lib PUBLIC pybind11::embed) INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIRS}) include_directories(pybind11/include) include_directories(${CMAKE_CURRENT_SOURCE_DIR})