Commit 1e0ed3a2 by Dominic Hamon

Rearrange the pieces

parent dcb1a3da
...@@ -55,6 +55,9 @@ cxx_feature_check(GNU_POSIX_REGEX) ...@@ -55,6 +55,9 @@ cxx_feature_check(GNU_POSIX_REGEX)
cxx_feature_check(POSIX_REGEX) cxx_feature_check(POSIX_REGEX)
cxx_feature_check(STEADY_CLOCK) cxx_feature_check(STEADY_CLOCK)
# Ensure we have pthreads
find_package(Threads REQUIRED)
# Set up directories # Set up directories
include_directories(${PROJECT_SOURCE_DIR}/include) include_directories(${PROJECT_SOURCE_DIR}/include)
......
...@@ -19,20 +19,22 @@ endif() ...@@ -19,20 +19,22 @@ endif()
add_library(benchmark ${SOURCE_FILES} ${RE_FILES}) add_library(benchmark ${SOURCE_FILES} ${RE_FILES})
find_package(Threads REQUIRED)
target_link_libraries(benchmark ${CMAKE_THREAD_LIBS_INIT})
set_target_properties(benchmark PROPERTIES set_target_properties(benchmark PROPERTIES
OUTPUT_NAME "benchmark" OUTPUT_NAME "benchmark"
VERSION ${GENERIC_LIB_VERSION} VERSION ${GENERIC_LIB_VERSION}
SOVERSION ${GENERIC_LIB_SOVERSION} SOVERSION ${GENERIC_LIB_SOVERSION}
) )
# Link threads.
target_link_libraries(benchmark ${CMAKE_THREAD_LIBS_INIT})
# We need extra libraries on Windows # We need extra libraries on Windows
if(${CMAKE_SYSTEM_NAME} MATCHES "Windows") if(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
target_link_libraries(benchmark Shlwapi) target_link_libraries(benchmark Shlwapi)
endif() endif()
# Expose public API
target_include_directories(benchmark PUBLIC ${PROJECT_SOURCE_DIR}/include) target_include_directories(benchmark PUBLIC ${PROJECT_SOURCE_DIR}/include)
# Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable) # Install target (will install the library to specified CMAKE_INSTALL_PREFIX variable)
......
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