- add_custom_command(OUTPUT ${PACKAGE_LIBDIR}/${P}${OUT}.so
- DEPENDS ${BD}/${P}${OUT}.so
- COMMAND mkdir -p ${PACKAGE_LIBDIR}
- COMMAND cp ${BD}/${P}${OUT}.so ${PACKAGE_LIBDIR}
- )
- add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_LIBDIR}/${P}${OUT}.so)
- add_dependencies(populate ${POPULE_PACKAGE_TARGET})
- add_dependencies(${POPULE_PACKAGE_TARGET} ${TARGET})
- elseif(${T} STREQUAL "EXECUTABLE")
- add_custom_command(OUTPUT ${PACKAGE_BINDIR}/${P}${OUT}
- DEPENDS ${BD}/${P}${OUT}
- COMMAND mkdir -p ${PACKAGE_BINDIR}
- COMMAND cp ${BD}/${P}${OUT} ${PACKAGE_BINDIR}
- )
- add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_BINDIR}/${P}${OUT})
- add_dependencies(populate ${POPULE_PACKAGE_TARGET})
- add_dependencies(${POPULE_PACKAGE_TARGET} ${TARGET})
- elseif(${T} STREQUAL "HTDOCS")
- add_custom_command(OUTPUT ${PACKAGE_HTTPDIR}-xx
- DEPENDS ${BD}/${P}${OUT}
- COMMAND mkdir -p ${PACKAGE_HTTPDIR}
- COMMAND touch ${PACKAGE_HTTPDIR}
- COMMAND cp -r ${BD}/${P}${OUT}/* ${PACKAGE_HTTPDIR}
- )
- add_custom_target(${POPULE_PACKAGE_TARGET} DEPENDS ${PACKAGE_HTTPDIR}-xx)
- add_dependencies(populate ${POPULE_PACKAGE_TARGET})
- add_dependencies(${POPULE_PACKAGE_TARGET} ${TARGET})
- elseif(${T} STREQUAL "DATA")
- # Generate list of output files instead of just one output directory
- get_target_property(SF ${TARGET} SOURCES)
- foreach(file ${SF})
- get_filename_component(JUST_FILENAME ${file} NAME)
- list(APPEND OUTPUT_FILES ${PACKAGE_DATADIR}/${JUST_FILENAME})
- endforeach()
- add_custom_target(${POPULE_PACKAGE_TARGET})
- add_custom_command(TARGET ${POPULE_PACKAGE_TARGET}
- POST_BUILD
- COMMAND mkdir -p ${PACKAGE_DATADIR}
- COMMAND touch ${PACKAGE_DATADIR}
- COMMAND cp -r ${BD}/${TARGET} ${PACKAGE_DATADIR}
- )
- add_dependencies(populate ${POPULE_PACKAGE_TARGET})
- add_dependencies(${POPULE_PACKAGE_TARGET} ${TARGET})
+ get_target_property(IMPPATH ${TARGET} IMPORTED_LOCATION)
+ if(${T} STREQUAL "LIBRARY")
+ unset(BD)
+ generate_one_populate_target(${IMPPATH} ${PACKAGE_LIBDIR})
+ elseif(${T} STREQUAL "PLUGIN")
+ if(NOT S)
+ set(S ".ctlso")
+ endif()
+ generate_one_populate_target(${P}${OUT}${S} "${PACKAGE_AFBDIR}/plugins")
+ elseif(${T} STREQUAL "BINDING")
+ if(NOT S)
+ set(S ".so")
+ endif()
+ list(APPEND BINDINGS_LIST "${P}${OUT}${S}")
+ generate_one_populate_target(${P}${OUT}${S} ${PACKAGE_AFBDIR})
+ elseif(${T} STREQUAL "BINDINGV2")
+ if(NOT S)
+ set(S ".so")
+ endif()
+ afb_genskel()
+ generate_one_populate_target(${P}${OUT}${S} ${PACKAGE_AFBDIR})
+ elseif(${T} STREQUAL "EXECUTABLE")
+ if(NOT S)
+ set(S "")
+ endif()
+ if(NOT OUT AND IMPPATH)
+ unset(BD)
+ generate_one_populate_target(${IMPPATH} ${PACKAGE_BINDIR})
+ else()
+ generate_one_populate_target(${P}${OUT}${S} ${PACKAGE_BINDIR})
+ endif()
+ elseif(${T} STREQUAL "HTDOCS")
+ generate_one_populate_target(${P}${OUT} ${PACKAGE_HTTPDIR})
+ elseif(${T} STREQUAL "DATA")
+ generate_one_populate_target(${TARGET} ${PACKAGE_DATADIR})