mirror of https://github.com/google/benchmark.git
Allow shared libraries with BUILD_SHARED_LIBS
This commit is contained in:
parent
4fae2944c7
commit
57fdf38f74
|
@ -1,4 +1,7 @@
|
|||
*.a
|
||||
*.so
|
||||
*.so.?*
|
||||
*.dylib
|
||||
*.cmake
|
||||
*~
|
||||
/test/benchmark_test
|
||||
|
|
|
@ -38,6 +38,10 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86")
|
|||
add_definitions(-DARCH_X86)
|
||||
endif()
|
||||
|
||||
# The version of the libraries
|
||||
set(GENERIC_LIB_VERSION "0.0.0")
|
||||
set(GENERIC_LIB_SOVERSION "0")
|
||||
|
||||
# Set up directories
|
||||
include_directories(${PROJECT_SOURCE_DIR}/include)
|
||||
include_directories(${PROJECT_SOURCE_DIR}/src)
|
||||
|
|
|
@ -1,8 +1,17 @@
|
|||
set(SOURCE_FILES "benchmark.cc" "colorprint.cc" "commandlineflags.cc" "sleep.cc" "sysinfo.cc" "walltime.cc")
|
||||
set(RE_FILES "re.cc")
|
||||
|
||||
add_library(benchmark_re STATIC ${RE_FILES})
|
||||
add_library(benchmark STATIC ${SOURCE_FILES} ${RE_FILES})
|
||||
add_library(benchmark_re ${RE_FILES})
|
||||
set_target_properties(benchmark_re PROPERTIES
|
||||
VERSION ${GENERIC_LIB_VERSION}
|
||||
SOVERSION ${GENERIC_LIB_SOVERSION}
|
||||
)
|
||||
|
||||
add_library(benchmark ${SOURCE_FILES} ${RE_FILES})
|
||||
set_target_properties(benchmark PROPERTIES
|
||||
VERSION ${GENERIC_LIB_VERSION}
|
||||
SOVERSION ${GENERIC_LIB_SOVERSION}
|
||||
)
|
||||
|
||||
# Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable)
|
||||
install(
|
||||
|
|
Loading…
Reference in New Issue