Skip to content

Commit b5475d4

Browse files
Don't guess a target's filepath for the install rule (#1227)
This fixes installation when the target file's destination is not at the guessed location (e.g. multiconf installs)
1 parent 8dbba2b commit b5475d4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/libmongoc/CMakeLists.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -850,9 +850,9 @@ target_link_libraries (mongoc-stat mongoc_shared ${LIBRARIES})
850850

851851
# mongoc-stat works if shared memory performance counters are enabled.
852852
if (ENABLE_SHM_COUNTERS STREQUAL "ON")
853-
install (PROGRAMS ${PROJECT_BINARY_DIR}/mongoc-stat
854-
DESTINATION ${CMAKE_INSTALL_BINDIR}
855-
)
853+
install (TARGETS mongoc-stat
854+
EXPORT mongoc_targets
855+
RUNTIME DESTINATION "${CMAKE_INSTALL_BINDIR}")
856856
endif ()
857857

858858
set (test-libmongoc-sources

0 commit comments

Comments
 (0)