aboutsummaryrefslogtreecommitdiff
blob: 3fb5b8b634fcb38e420c60de9892cc35baccfedb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
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})
target_link_libraries(c-portage ${PYTHON_LIBRARY})
add_executable(tester tester.c)
target_link_libraries(tester c-portage)

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)