aboutsummaryrefslogtreecommitdiff
blob: 22e27c72a3da183fda32bd69b74fc62fae9c28a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
find_package(PythonLibs REQUIRED)

include_directories(${PYTHON_INCLUDE_DIRS})
link_directories(${PYTHON_LIBRARIES})
add_definitions(-std=c99)

set(c-portage_SRCS dataconnect.c dict.c flag.c interpreter.c packageproperties.c stringlist.c)
set(c-portage_HDRS dataconnect.h dict.h flag.h internal.h interpreter.h packageproperties.h stringlist.h)

add_library(c-portage SHARED ${c-portage_SRCS})
add_executable(tester tester.c)
target_link_libraries(tester c-portage ${PYTHON_LIBRARY})

install(TARGETS c-portage DESTINATION lib)
install(FILES ${c-portage_HDRS} DESTINATION include/c-portage)

option(CppPortage "Enable c++ wrapper for c-portage (uses Qt4)")

if (CppPortage)
    add_subdirectory(Qt)
endif(CppPortage)