# -*- mode: cmake -*- # # Copyright (C) 2011-2022 Ben Key # Distributed under the Boost Software License, Version 1.0. # (See accompanying file LICENSE_1_0.txt or copy at # http://www.boost.org/LICENSE_1_0.txt) # 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() include("${CMAKE_SOURCE_DIR}/cmake/include/flags.cmake") include("${CMAKE_SOURCE_DIR}/cmake/include/boost.cmake") file(GLOB executable_path_example_SRC "${CMAKE_SOURCE_DIR}/include/boost/*.hpp" "${CMAKE_SOURCE_DIR}/include/detail/*.hpp" "${CMAKE_CURRENT_SOURCE_DIR}/*.cpp" ) add_executable(executable_path_example ${executable_path_example_SRC}) set_property(TARGET executable_path_example PROPERTY INTERFACE_POSITION_INDEPENDENT_CODE ON) target_include_directories(executable_path_example PRIVATE ${Boost_INCLUDE_DIRS}) target_link_libraries(executable_path_example PRIVATE executable_path ${EXTRA_LIBRARIES} ${Boost_LIBRARIES}) install(TARGETS executable_path_example DESTINATION ${CMAKE_INSTALL_BINDIR})