2014-07-31 22:19:54 +08:00
|
|
|
# Define the source files
|
2014-04-23 15:47:07 +08:00
|
|
|
set(SOURCE_FILES "benchmark.cc" "colorprint.cc" "commandlineflags.cc" "sleep.cc" "sysinfo.cc" "walltime.cc")
|
2014-04-23 15:56:17 +08:00
|
|
|
set(RE_FILES "re.cc")
|
2014-04-23 15:47:07 +08:00
|
|
|
|
2014-07-31 22:19:54 +08:00
|
|
|
# Build a regular expression library
|
2014-07-30 23:59:14 +08:00
|
|
|
add_library(benchmark_re ${RE_FILES})
|
|
|
|
set_target_properties(benchmark_re PROPERTIES
|
|
|
|
VERSION ${GENERIC_LIB_VERSION}
|
|
|
|
SOVERSION ${GENERIC_LIB_SOVERSION}
|
|
|
|
)
|
|
|
|
|
2014-07-31 22:19:54 +08:00
|
|
|
# Build the benchmark library
|
2014-07-30 23:59:14 +08:00
|
|
|
add_library(benchmark ${SOURCE_FILES} ${RE_FILES})
|
|
|
|
set_target_properties(benchmark PROPERTIES
|
|
|
|
VERSION ${GENERIC_LIB_VERSION}
|
|
|
|
SOVERSION ${GENERIC_LIB_SOVERSION}
|
|
|
|
)
|
2014-04-23 15:47:07 +08:00
|
|
|
|
|
|
|
# Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable)
|
|
|
|
install(
|
|
|
|
TARGETS benchmark
|
|
|
|
ARCHIVE DESTINATION lib
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
COMPONENT library)
|
|
|
|
install(
|
|
|
|
DIRECTORY "${PROJECT_SOURCE_DIR}/include/benchmark"
|
|
|
|
DESTINATION include
|
|
|
|
FILES_MATCHING PATTERN "*.*h")
|