CMAKE: Allow building for Linux platform (Tested in Debian 11, codename bookworm)
This commit is contained in:
parent
a1e98443c7
commit
f05c9882ed
|
@ -1,18 +1,34 @@
|
|||
cmake_minimum_required(VERSION 3.21)
|
||||
project(clAugeas VERSION 1.0.1 DESCRIPTION "clAugeas description")
|
||||
|
||||
include_directories(/opt/homebrew/opt/augeas/include/)
|
||||
link_directories(/opt/homebrew/opt/augeas/lib)
|
||||
|
||||
set(CMAKE_CXX_STANDARD 14)
|
||||
set(GCC_COVERAGE_COMPILE_FLAGS "-fdeclspec")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${GCC_COVERAGE_COMPILE_FLAGS}")
|
||||
|
||||
if(WIN32)
|
||||
message("TODO: Windows instructions")
|
||||
elseif(APPLE)
|
||||
include_directories(/opt/homebrew/opt/augeas/include/)
|
||||
#link_directories(/opt/homebrew/opt/augeas/lib) # TODO: Check if works with this commente.d
|
||||
elseif(UNIX)
|
||||
include_directories(/usr/include/libxml2/)
|
||||
endif()
|
||||
|
||||
|
||||
find_library(
|
||||
AUGEAS
|
||||
augeas
|
||||
|
||||
)
|
||||
find_library(
|
||||
xml2
|
||||
xml
|
||||
)
|
||||
|
||||
add_library(clAugeas SHARED
|
||||
augSettings.cpp
|
||||
augSettings.h
|
||||
main.cpp main.h)
|
||||
|
||||
target_link_libraries(clAugeas xml2)
|
||||
|
||||
target_link_libraries(clAugeas augeas)
|
||||
|
||||
|
||||
|
|
6
README
6
README
|
@ -3,3 +3,9 @@ claugeas - Augeas Wrapper
|
|||
Library that facilitates C# and other language bindings.
|
||||
This is a necessary library for the Augeas C# bindings.
|
||||
|
||||
Mac Os install:
|
||||
|
||||
brew install --build-from-source augeas
|
||||
|
||||
Unix Dependencies:
|
||||
libaugeas-dev, libxml2, readline-dev, readline
|
Loading…
Reference in New Issue