cmake_minimum_required(VERSION 3.10) project(PrivateBinAPIExample) set(CMAKE_CXX_STANDARD 17) # Build example and link against the in-tree target add_executable(example example.cpp) target_link_libraries(example PRIVATE privatebinapi) # On Windows, copy the DLL next to the example for easy execution if(WIN32) add_custom_command(TARGET example POST_BUILD COMMAND ${CMAKE_COMMAND} -E copy_if_different $ $ ) endif()