xlnt/cmake/common.cmake
2016-12-14 12:04:34 +01:00

25 lines
939 B
CMake

set(LIBRARY_NAME xlnt)
set(LIBRARY_VERSION 0.9.1)
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
cmake_policy(SET CMP0048 NEW)
# 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()