xlnt/cmake/common.cmake

25 lines
939 B
CMake
Raw Normal View History

2016-10-28 06:40:20 +08:00
set(LIBRARY_NAME xlnt)
set(LIBRARY_VERSION 0.9.1)
2016-10-28 06:40:20 +08:00
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
cmake_policy(SET CMP0048 NEW)
2016-10-28 06:40:20 +08:00
# Global library directories
set(LIBRARY_INCLUDE_DIR ${CMAKE_CURRENT_LIST_DIR}/../include)
set(LIBRARY_SOURCE_DIR ${CMAKE_CURRENT_LIST_DIR}/../source)
set(THIRD_PARTY_DIR ${CMAKE_CURRENT_LIST_DIR}/../third-party)
# Put all output files in the same directory
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
foreach(OUTPUTCONFIG ${CMAKE_CONFIGURATION_TYPES})
string(TOUPPER ${OUTPUTCONFIG} OUTPUTCONFIG)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY_${OUTPUTCONFIG} ${CMAKE_BINARY_DIR}/bin)
endforeach()