diff --git a/src/python/plugins/janapy/CMakeLists.txt b/src/python/plugins/janapy/CMakeLists.txt index f615959fb..45cf0e751 100644 --- a/src/python/plugins/janapy/CMakeLists.txt +++ b/src/python/plugins/janapy/CMakeLists.txt @@ -1,13 +1,12 @@ # See https://pybind11.readthedocs.io/en/stable/faq.html#someclass-declared-with-greater-visibility-than-the-type-of-its-field-someclass-member-wattributes -add_library(janapy_plugin SHARED janapy_plugin.cc) -target_compile_options(janapy_plugin PRIVATE "-fvisibility=hidden") -target_include_directories(janapy_plugin PRIVATE ${PYTHON_INCLUDE_DIRS} ${pybind11_INCLUDE_DIRS} ../../common) -target_link_libraries(janapy_plugin PRIVATE ${PYTHON_LIBRARIES} pybind11::embed) +add_jana_plugin(janapy SOURCES janapy_plugin.cc) + +target_compile_options(janapy PRIVATE "-fvisibility=hidden") +target_include_directories(janapy PRIVATE ${PYTHON_INCLUDE_DIRS} ${pybind11_INCLUDE_DIRS} ../../common) +target_link_libraries(janapy PRIVATE ${PYTHON_LIBRARIES} pybind11::embed) -set_target_properties(janapy_plugin PROPERTIES PREFIX "" SUFFIX ".so" LIBRARY_OUTPUT_NAME "janapy") -install(TARGETS janapy_plugin DESTINATION plugins)