started updating examples for cmake v3 syntax

This commit is contained in:
ttroy50
2016-04-15 23:49:39 +01:00
parent e56847a5ef
commit 3335200e43
12 changed files with 96 additions and 48 deletions

View File

@@ -1,11 +1,7 @@
cmake_minimum_required(VERSION 2.6)
cmake_minimum_required(VERSION 3.0)
project(cmake_examples_install)
include_directories(
${PROJECT_SOURCE_DIR}/inc
)
############################################################
# Create a library
############################################################
@@ -18,6 +14,11 @@ set(library_SOURCES
#Generate the shared library from the library sources
add_library(cmake_examples_inst SHARED ${library_SOURCES})
target_include_directories(cmake_examples_inst
PUBLIC ${PROJECT_SOURCE_DIR}/inc
)
############################################################
# Create an executable
############################################################
@@ -32,7 +33,7 @@ add_executable(cmake_examples_inst_bin ${binary_SOURCES})
# link the new hello_library target with the hello_binary target
target_link_libraries( cmake_examples_inst_bin
cmake_examples_inst
PRIVATE cmake_examples_inst
)
############################################################