diff --git a/README.md b/README.md index 7a95463..313c8fd 100644 --- a/README.md +++ b/README.md @@ -54,7 +54,7 @@ cmake --build . ``` For building against preinstalled system libraries of the used vendor -libraries (system maintainers), additionally define +libraries (e.g. for use by system maintainers), additionally define `BLISP_USE_SYSTEM_LIBRARIES`, e.g. using following commands: ```bash mkdir build && cd build diff --git a/tools/blisp/CMakeLists.txt b/tools/blisp/CMakeLists.txt index e694d7f..ac16d1d 100644 --- a/tools/blisp/CMakeLists.txt +++ b/tools/blisp/CMakeLists.txt @@ -2,17 +2,19 @@ set(ARGTABLE3_ENABLE_TESTS OFF CACHE BOOL "Enable unit tests") set(ARGTABLE3_ENABLE_EXAMPLES OFF CACHE BOOL "Enable examples") #set(ARGTABLE3_REPLACE_GETOPT OFF CACHE BOOL "Replace getopt in the system C library") -if(BLISP_USE_SYSTEM_LIBRARIES) - find_package(Argtable3) -else() - add_subdirectory(${CMAKE_SOURCE_DIR}/vendor/argtable3 ${CMAKE_CURRENT_BINARY_DIR}/argtable3) -endif() - add_executable(blisp src/main.c src/cmd/write.c src/util.c src/common.c src/cmd/iot.c) -target_include_directories(blisp PRIVATE - "${CMAKE_SOURCE_DIR}/include" +if(BLISP_USE_SYSTEM_LIBRARIES) + find_package(Argtable3 REQUIRED) +else() + add_subdirectory(${CMAKE_SOURCE_DIR}/vendor/argtable3 ${CMAKE_CURRENT_BINARY_DIR}/argtable3) + + target_include_directories(blisp PRIVATE "${CMAKE_SOURCE_DIR}/vendor/argtable3/src") +endif() + +target_include_directories(blisp PRIVATE + "${CMAKE_SOURCE_DIR}/include") target_link_libraries(blisp PRIVATE argtable3