xlnt/benchmarks/CMakeLists.txt

21 lines
657 B
CMake
Raw Normal View History

2016-12-03 19:13:17 +08:00
cmake_minimum_required(VERSION 3.1)
project(xlnt.benchmarks)
2016-12-03 19:13:17 +08:00
if(NOT COMBINED_PROJECT)
add_subdirectory(${LIBRARY_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/source)
2016-12-03 19:13:17 +08:00
endif()
2016-12-03 19:13:17 +08:00
include_directories(${LIBRARY_INCLUDE_DIR})
2016-12-03 19:13:17 +08:00
file(GLOB SAMPLE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
foreach(SAMPLE_SOURCE IN ITEMS ${SAMPLE_SOURCES})
get_filename_component(SAMPLE_NAME ${SAMPLE_SOURCE} NAME_WE)
set(SAMPLE_EXECUTABLE benchmark-${SAMPLE_NAME})
add_executable(${SAMPLE_EXECUTABLE} ${SAMPLE_SOURCE})
target_link_libraries(${SAMPLE_EXECUTABLE} xlnt)
2016-12-03 19:13:17 +08:00
endforeach()
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/data
DESTINATION ${CMAKE_BINARY_DIR}/bin)