project(KeyView) cmake_minimum_required(VERSION 3.16.0) if(DEFINED ENV{VCPKG_ROOT} AND NOT DEFINED CMAKE_TOOLCHAIN_FILE) set(CMAKE_TOOLCHAIN_FILE "$ENV{VCPKG_ROOT}/scripts/buildsystems/vcpkg.cmake" CACHE STRING "") endif() if(DEFINED ENV{VCPKG_DEFAULT_TRIPLET} AND NOT DEFINED VCPKG_TARGET_TRIPLET) set(VCPKG_TARGET_TRIPLET "$ENV{VCPKG_DEFAULT_TRIPLET}" CACHE STRING "") endif() if(NOT DEFINED CMAKE_INSTALL_BINDIR) set(CMAKE_INSTALL_BINDIR "bin" CACHE PATH "user executables (bin)") endif(NOT DEFINED CMAKE_INSTALL_BINDIR) include("${CMAKE_SOURCE_DIR}/cmake/include/flags.cmake") include("${CMAKE_SOURCE_DIR}/cmake/include/boost.cmake") include("${CMAKE_SOURCE_DIR}/cmake/include/icu.cmake") file(GLOB KeyView_SRC "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" "${CMAKE_CURRENT_SOURCE_DIR}/*.rc") add_executable(KeyView ${KeyView_SRC}) target_link_libraries(KeyView comctl32 oleacc ${EXTRA_LIBRARIES}) target_link_libraries(KeyView ${Boost_LIBRARIES}) if(ICU_FOUND) target_link_libraries(KeyView ${ICU_LIBRARIES}) endif(ICU_FOUND) if(WIN32 AND NOT MSVC) target_link_libraries(KeyView msvcr120) endif(WIN32 AND NOT MSVC) set_property(TARGET KeyView PROPERTY POSITION_INDEPENDENT_CODE ON) install(TARGETS KeyView DESTINATION ${CMAKE_INSTALL_BINDIR})