Add target_include_directories

This commit is contained in:
Francesco Rigoni 2018-03-04 20:33:53 +01:00
parent b4e4c72315
commit a5d87d6b60

View File

@ -17,11 +17,6 @@ set(SIMPLE_LOGGER_SRC ${source_dir})
ExternalProject_Get_Property(simple-logger binary_dir)
set(SIMPLE_LOGGER_BIN ${binary_dir})
# Add all include directories
include_directories(src/** ${SIMPLE_LOGGER_SRC})
# Add paths for linker
link_directories(${SIMPLE_LOGGER_BIN})
if (CMAKE_VERSION VERSION_LESS "3.1")
if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set (CMAKE_CXX_FLAGS "--std=gnu++14 ${CMAKE_CXX_FLAGS}")
@ -30,11 +25,17 @@ else ()
set (CMAKE_CXX_STANDARD 14)
endif ()
# Add all include directories
include_directories(include/** ${SIMPLE_LOGGER_SRC})
# Add paths for linker
link_directories(${SIMPLE_LOGGER_BIN})
# All warnings on
set (CMAKE_CXX_FLAGS "-Wall ${CMAKE_CXX_FLAGS}")
file(GLOB sources_65816 src/*.cpp src/opcodes/*.cpp)
add_library(65816 ${sources_65816})
add_dependencies(65816 simple-logger)
target_link_libraries(65816 simpleLogger)
target_include_directories(65816 INTERFACE include/*)