Skip to content

Commit cc8fc1d

Browse files
feat(core): allow installation as a system lib
1 parent 5324618 commit cc8fc1d

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

core/CMakeLists.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,22 @@ if(NOT CODSPEED_MODE STREQUAL "off")
9797
endif()
9898
endif()
9999

100+
install(
101+
FILES
102+
include/codspeed.h # or wherever codspeed.h is located in core/
103+
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/benchmark
104+
# Or possibly: DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
105+
)
106+
107+
install(
108+
TARGETS codspeed
109+
EXPORT codspeed-targets
110+
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
111+
ARCHIVE DESTINATION ${CMAKE_INSTALL_LIBDIR}
112+
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
113+
INCLUDES DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
114+
)
115+
100116
message(STATUS "Codspeed mode: ${CODSPEED_MODE}")
101117

102118
option(ENABLE_TESTS "Enable building the unit tests which depend on gtest" OFF)

0 commit comments

Comments
 (0)