diff options
author | Theofilos Intzoglou <int.teo@gmail.com> | 2011-10-06 20:36:12 +0300 |
---|---|---|
committer | Theofilos Intzoglou <int.teo@gmail.com> | 2011-10-06 20:36:12 +0300 |
commit | 7d771a8e8fe308e792e1ed170a0c32328800ab0f (patch) | |
tree | 3ab3a1388c2c28be0c1157f1a82a0739b3691915 | |
parent | Add rules to install the cpp-portage library and its corresponding header files (diff) | |
download | c-portage-7d771a8e8fe308e792e1ed170a0c32328800ab0f.tar.gz c-portage-7d771a8e8fe308e792e1ed170a0c32328800ab0f.tar.bz2 c-portage-7d771a8e8fe308e792e1ed170a0c32328800ab0f.zip |
Reorganise CMakeLists so that the proper header files are installed for the appropriate target and add a rule for the testing program (it won't install though -- no need to)
-rw-r--r-- | src/CMakeLists.txt | 11 | ||||
-rw-r--r-- | src/Qt/CMakeLists.txt | 3 |
2 files changed, 11 insertions, 3 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index cfbbc14..637e697 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,9 +1,18 @@ find_package(PythonLibs REQUIRED) include_directories(${PYTHON_INCLUDE_DIRS}) +link_directories(${PYTHON_LIBRARIES}) add_definitions(-std=c99) -add_library(c-portage dataconnect.c dict.c flag.c interpreter.c packageproperties.c portagesettings.c stringlist.c tester.c) + +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)") diff --git a/src/Qt/CMakeLists.txt b/src/Qt/CMakeLists.txt index 1b639ec..2a19c3e 100644 --- a/src/Qt/CMakeLists.txt +++ b/src/Qt/CMakeLists.txt @@ -9,5 +9,4 @@ QT4_WRAP_CPP(cpp-portage_MOC_SRCS ${cpp-portage_HDRS}) add_library(cpp-portage qportagesettings.cpp ${cpp-portage_MOC_SRCS}) install(TARGETS cpp-portage DESTINATION lib) -install(DIRECTORY . DESTINATION include/cpp-portage - FILES_MATCHING PATTERN "*.h")
\ No newline at end of file +install(FILES ${cpp-portage_HDRS} DESTINATION include/cpp-portage)
\ No newline at end of file |