22 lines
885 B
Diff
Executable File
22 lines
885 B
Diff
Executable File
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
|
index b2f6089..d997097 100644
|
|
--- a/CMakeLists.txt
|
|
+++ b/CMakeLists.txt
|
|
@@ -3,9 +3,6 @@ project(nanobench LANGUAGES CXX)
|
|
|
|
# determine whether this is a standalone project or included by other projects
|
|
set(NANOBENCH_STANDALONE_PROJECT OFF)
|
|
-if (CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_SOURCE_DIR)
|
|
- set(NANOBENCH_STANDALONE_PROJECT ON)
|
|
-endif()
|
|
|
|
if (NANOBENCH_STANDALONE_PROJECT)
|
|
set(CMAKE_EXPORT_COMPILE_COMMANDS ON) # generate compile_commands.json
|
|
@@ -131,4 +128,6 @@ else()
|
|
add_library(nanobench::nanobench ALIAS nanobench)
|
|
set_property(TARGET nanobench PROPERTY CXX_STANDARD 17)
|
|
target_include_directories(nanobench PUBLIC ${PROJECT_SOURCE_DIR}/src/include)
|
|
+ install(TARGETS nanobench LIBRARY DESTINATION lib)
|
|
+ install(FILES src/include/nanobench.h DESTINATION include)
|
|
endif()
|