set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

add_library (injectee MODULE
    injectee.cpp
)
set_target_properties (injectee PROPERTIES
    PREFIX ""
    OUTPUT_NAME inject
)
install (TARGETS injectee LIBRARY DESTINATION bin)

add_executable (injector
    injector.cpp
)
install (TARGETS injector RUNTIME DESTINATION bin)

set (CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR})

add_library (injectee MODULE
    injectee.cpp
)
set_target_properties (injectee PROPERTIES
    PREFIX ""
    OUTPUT_NAME inject
)
install (TARGETS injectee LIBRARY DESTINATION bin)

add_executable (injector
    injector.cpp
)
set_target_properties (injector PROPERTIES
    OUTPUT_NAME inject
)
install (TARGETS injector RUNTIME DESTINATION bin)

Revert "cmake: Fix some spurious copy'n'paste code in inject module."
Revert "cmake: Fix some spurious copy'n'paste code in inject module."

This reverts commit 208689b5c9c08f08adb712d29f0c97dfe4ffaebb.

The target was indeed supposed to have the same name.  If this is a
problem for ninja then we'll need to rename things.
