Skip to content
Permalink
c870529952
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
20 lines (14 sloc) 585 Bytes
cmake_minimum_required(VERSION 3.0)
set(CMAKE_CXX_STANDARD 14)
project(print_two CXX)
# config directories
include_directories(${CMAKE_SOURCE_DIR})
# tell cmake where to put the executables that it creates
# also creates the directory if needed
file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/bin)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/bin )
file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_SOURCE_DIR}/lib)
add_library(print_two SHARED print_two.cpp)
add_executable( main main.cpp )
target_link_libraries( main print_two )