# Set the minimum version of CMake that can be used
cmake_minimum_required(VERSION 3.5)
# Set the project name
project (myproject)
add_subdirectory(mylib)
# Add an executable
add_executable(myproject main.cpp)
target_link_libraries(myproject mylib)