mirror of
https://github.com/pine64/blisp.git
synced 2025-04-29 13:47:14 +00:00
Small improvements for building against system lib
Avoid including include dir when building against system lib (to avoid possible dup when also checked out as submodule). Refine README description.
This commit is contained in:
parent
d4df989c61
commit
f3ebe141ee
@ -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
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user