blob: fe7d70438d00a48c046012c6be981d73f676bb4d [file] [log] [blame]
cmake_minimum_required(VERSION 3.15)
project(Importing)
# specify the C++ standard
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Add executable
add_executable(myexe IMPORTED)
# Set imported location
set_property(TARGET myexe PROPERTY
IMPORTED_LOCATION "../InstallMyExe/bin/myexe")
# Add custom command to create source file
add_custom_command(OUTPUT main.cc COMMAND myexe)
# Use source file
add_executable(mynewexe main.cc)