Better CMake dependency integration

This commit is contained in:
Jack Andersen 2019-06-11 15:58:24 -10:00
parent f7da328248
commit 55892696bb
1 changed files with 1 additions and 1 deletions

View File

@ -1,6 +1,6 @@
cmake_minimum_required(VERSION 3.10) cmake_minimum_required(VERSION 3.10)
project(lzokay) project(lzokay)
add_library(lzokay lzokay.hpp lzokay.cpp) add_library(lzokay lzokay.hpp lzokay.cpp)
set(LZOKAY_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR} CACHE PATH "lzokay include path" FORCE)
add_executable(lzokaytest test.cpp) add_executable(lzokaytest test.cpp)
target_include_directories(lzokay PUBLIC $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>)
target_link_libraries(lzokaytest lzokay) target_link_libraries(lzokaytest lzokay)