1 file(GLOB _SRCS ${CMAKE_CURRENT_SOURCE_DIR}/*.cc ${CMAKE_CURRENT_SOURCE_DIR}/*.h)
2 file(GLOB _CUDA_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/*.cu ${CMAKE_CURRENT_SOURCE_DIR}/*.cuh)
4 list(APPEND PLUGIN_SRC ${_SRCS})
7 CUDA_COMPILE(_CUDA_GENERATED_FILES ${_CUDA_SRCS} OPTIONS ${CUDA_ADDITIONAL_OPTIONS} SHARED)
8 list(APPEND PLUGIN_SRC ${_CUDA_GENERATED_FILES})
11 # build the C++ python module
12 set(LIB_TARGET "_${PROJECT_NAME}")
13 add_library(${LIB_TARGET} ${PLUGIN_SRC} ${PYMODULE_BUILD})
14 target_link_libraries(${LIB_TARGET} ${HOOMD_LIBRARIES})
15 # fix up the file name so it will work as a python module
16 set_target_properties(${LIB_TARGET} PROPERTIES PREFIX "" OUTPUT_NAME "${LIB_TARGET}")
18 set_target_properties(${LIB_TARGET} PROPERTIES SUFFIX ".so")
20 fix_cudart_rpath(${LIB_TARGET})
22 # install the library to the hoomd_plugins directory
23 install(TARGETS ${LIB_TARGET}
24 LIBRARY DESTINATION hoomd_plugins/${PROJECT_NAME}