Commit 57fdf38f by Matt Clarkson

Allow shared libraries with BUILD_SHARED_LIBS

parent 4fae2944
*.a *.a
*.so
*.so.?*
*.dylib
*.cmake *.cmake
*~ *~
/test/benchmark_test /test/benchmark_test
......
...@@ -38,6 +38,10 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86") ...@@ -38,6 +38,10 @@ if(${CMAKE_SYSTEM_PROCESSOR} MATCHES "x86")
add_definitions(-DARCH_X86) add_definitions(-DARCH_X86)
endif() endif()
# The version of the libraries
set(GENERIC_LIB_VERSION "0.0.0")
set(GENERIC_LIB_SOVERSION "0")
# Set up directories # Set up directories
include_directories(${PROJECT_SOURCE_DIR}/include) include_directories(${PROJECT_SOURCE_DIR}/include)
include_directories(${PROJECT_SOURCE_DIR}/src) include_directories(${PROJECT_SOURCE_DIR}/src)
......
set(SOURCE_FILES "benchmark.cc" "colorprint.cc" "commandlineflags.cc" "sleep.cc" "sysinfo.cc" "walltime.cc") set(SOURCE_FILES "benchmark.cc" "colorprint.cc" "commandlineflags.cc" "sleep.cc" "sysinfo.cc" "walltime.cc")
set(RE_FILES "re.cc") set(RE_FILES "re.cc")
add_library(benchmark_re STATIC ${RE_FILES}) add_library(benchmark_re ${RE_FILES})
add_library(benchmark STATIC ${SOURCE_FILES} ${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 target (will install the library to specified CMAKE_INSTALL_PREFIX variable)
install( install(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment