From 4bcf480e940a0c74a1fb351582e81eb68359280a Mon Sep 17 00:00:00 2001 From: Theofilos Intzoglou Date: Sun, 9 Oct 2011 02:37:34 +0300 Subject: Make cpp-portage a shared library, correctly identify which header files to install and fix include paths --- CMakeLists.txt | 3 --- src/Qt/CMakeLists.txt | 8 ++++---- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 149d05d..e9823d2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,7 +4,4 @@ cmake_minimum_required(VERSION 2.8) set(CMAKE_MODULE_PATH ${c-portage_SOURCE_DIR}/cmake) find_package(PortageApi REQUIRED) -install(DIRECTORY src/ DESTINATION include/c-portage - FILES_MATCHING PATTERN "*.h") - add_subdirectory(src) diff --git a/src/Qt/CMakeLists.txt b/src/Qt/CMakeLists.txt index 2a19c3e..8388c30 100644 --- a/src/Qt/CMakeLists.txt +++ b/src/Qt/CMakeLists.txt @@ -1,12 +1,12 @@ find_package(Qt4 REQUIRED) -include_directories(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR}) +include_directories(${QT_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ..) remove_definitions(-std=c99) -set(cpp-portage_SRCS qportagesettings.cpp) -set(cpp-portage_HDRS qportagesettings.h) +set(cpp-portage_SRCS qportage.cpp qportagesettings.cpp helper.cpp) +set(cpp-portage_HDRS qportage.h qportagesettings.h helper.h) QT4_WRAP_CPP(cpp-portage_MOC_SRCS ${cpp-portage_HDRS}) -add_library(cpp-portage qportagesettings.cpp ${cpp-portage_MOC_SRCS}) +add_library(cpp-portage SHARED ${cpp-portage_SRCS} ${cpp-portage_MOC_SRCS}) install(TARGETS cpp-portage DESTINATION lib) install(FILES ${cpp-portage_HDRS} DESTINATION include/cpp-portage) \ No newline at end of file -- cgit v1.2.3-65-gdbad