mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
fix samples cmake lists
This commit is contained in:
parent
4fdba1abce
commit
533a20bdc3
|
@ -5,7 +5,7 @@ set(CMAKE_CXX_STANDARD 14)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
if(NOT COMBINED_PROJECT)
|
if(NOT COMBINED_PROJECT)
|
||||||
add_subdirectory(${LIBRARY_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/source)
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../source ${CMAKE_CURRENT_BINARY_DIR}/source)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(${LIBRARY_INCLUDE_DIR})
|
include_directories(${LIBRARY_INCLUDE_DIR})
|
||||||
|
|
|
@ -5,18 +5,16 @@ set(CMAKE_CXX_STANDARD 14)
|
||||||
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
||||||
|
|
||||||
if(NOT COMBINED_PROJECT)
|
if(NOT COMBINED_PROJECT)
|
||||||
add_subdirectory(${LIBRARY_SOURCE_DIR} ${CMAKE_CURRENT_BINARY_DIR}/source)
|
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/../source ${CMAKE_CURRENT_BINARY_DIR}/source)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
include_directories(${LIBRARY_INCLUDE_DIR})
|
|
||||||
|
|
||||||
file(GLOB SAMPLE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
file(GLOB SAMPLE_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
|
||||||
|
|
||||||
foreach(SAMPLE_SOURCE IN ITEMS ${SAMPLE_SOURCES})
|
foreach(SAMPLE_SOURCE IN ITEMS ${SAMPLE_SOURCES})
|
||||||
get_filename_component(SAMPLE_NAME ${SAMPLE_SOURCE} NAME_WE)
|
get_filename_component(SAMPLE_NAME ${SAMPLE_SOURCE} NAME_WE)
|
||||||
set(SAMPLE_EXECUTABLE sample-${SAMPLE_NAME})
|
set(SAMPLE_EXECUTABLE sample-${SAMPLE_NAME})
|
||||||
add_executable(${SAMPLE_EXECUTABLE} ${SAMPLE_SOURCE})
|
add_executable(${SAMPLE_EXECUTABLE} ${SAMPLE_SOURCE})
|
||||||
target_link_libraries(${SAMPLE_EXECUTABLE} ${LIBRARY_NAME})
|
target_link_libraries(${SAMPLE_EXECUTABLE} xlnt)
|
||||||
endforeach()
|
endforeach()
|
||||||
|
|
||||||
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/data
|
file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/data
|
||||||
|
|
Loading…
Reference in New Issue
Block a user