summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Schmelzer2011-12-05 15:11:07 +0100
committerSebastian Schmelzer2011-12-05 15:11:07 +0100
commitc9259a2b588e7472b0a131237b39fc99e395e820 (patch)
treeed5b236c0e4f6f6d3cc375996e9ad4cb86aa004e
parentfinaly clean cmake files (diff)
downloadfbgui-c9259a2b588e7472b0a131237b39fc99e395e820.tar.gz
fbgui-c9259a2b588e7472b0a131237b39fc99e395e820.tar.xz
fbgui-c9259a2b588e7472b0a131237b39fc99e395e820.zip
add cpack stuff
-rw-r--r--CMakeLists.txt14
-rw-r--r--src/customdhcpcd/CMakeLists.txt3
-rw-r--r--src/fbgui/CMakeLists.txt35
3 files changed, 36 insertions, 16 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 6b20383..fced314 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -2,7 +2,21 @@ cmake_minimum_required(VERSION 2.8)
project(fbgui)
+set(fbgui_VERSION_MAJOR 0)
+set(fbgui_VERSION_MINOR 1)
+set(fbgui_VERSION_PATCH 0)
+
find_package(PkgConfig)
add_subdirectory(src/customdhcpcd)
add_subdirectory(src/fbgui)
+
+set(CPACK_GENERATOR "TGZ")
+set(CPACK_PACKAGE_NAME "fbgui")
+set(CPACK_INCLUDE_TOPLEVEL_DIRECTORY 0)
+set(CPACK_STRIP_FILES bin/fbgui;bin/cdhcpcd)
+set(CPACK_PACKAGE_VERSION "${fbgui_VERSION_MAJOR}.${fbgui_VERSION_MINOR}.${fbgui_VERSION_PATCH}")
+set(CPACK_PACKAGE_FILE_NAME "fbgui-${CPACK_PACKAGE_VERSION}")
+set(CPACK_SOURCE_PACKAGE_FILE_NAME "fbgui-${CPACK_PACKAGE_VERSION}.src")
+
+INCLUDE(CPack)
diff --git a/src/customdhcpcd/CMakeLists.txt b/src/customdhcpcd/CMakeLists.txt
index f257ab2..48faeda 100644
--- a/src/customdhcpcd/CMakeLists.txt
+++ b/src/customdhcpcd/CMakeLists.txt
@@ -8,3 +8,6 @@ target_link_libraries(customdhcpcd rt)
add_executable(cdhcpcd dhcpcd.c)
set_target_properties(cdhcpcd PROPERTIES LINKER_LANGUAGE C)
target_link_libraries(cdhcpcd customdhcpcd)
+
+install(TARGETS cdhcpcd RUNTIME DESTINATION bin)
+install(TARGETS customdhcpcd LIBRARY DESTINATION lib)
diff --git a/src/fbgui/CMakeLists.txt b/src/fbgui/CMakeLists.txt
index 434428f..8b19777 100644
--- a/src/fbgui/CMakeLists.txt
+++ b/src/fbgui/CMakeLists.txt
@@ -14,26 +14,27 @@ endif(QT4_FOUND)
set(QT_USE_QTNETWORK TRUE)
set(QT_USE_QTWEBKIT TRUE)
-file(GLOB FBGUI_SOURCES src/fbgui/*.cpp)
-file(GLOB FBGUI_HEADERS src/fbgui/*.h src/common/*.h)
+file(GLOB FBGUI_SOURCES *.cpp)
+file(GLOB FBGUI_HEADERS *.h ../common/*.h)
file(GLOB FBGUI_MOC_HEADERS
-src/fbgui/downloadmanager.h
-src/fbgui/interfaceconfiguration.h
-src/fbgui/javascriptinterface.h
-src/fbgui/ndgui.h
-src/fbgui/networkdiscovery.h
-src/fbgui/networkmanager.h
-src/fbgui/fbgui.h)
-file(GLOB FBGUI_UIS src/fbgui/*.ui)
-file(GLOB FBGUI_RCS src/fbgui/*.qrc)
+downloadmanager.h
+interfaceconfiguration.h
+javascriptinterface.h
+ndgui.h
+networkdiscovery.h
+networkmanager.h
+fbgui.h)
+file(GLOB FBGUI_UIS *.ui)
+file(GLOB FBGUI_RCS *.qrc)
include_directories(${CMAKE_CURRENT_BINARY_DIR}
/usr/include/
- ${QT_INCLUDES}
- ${LOG4CXX_INCLUDES}
- ${LIBSYSFS_INCLUDES}
- ${LIBNL_INCLUDES}
- ${LIBUSB_INCLUDES}
+ ../customdhcpcd/
+ ${QT_INCLUDE_DIRS}
+ ${LOG4CXX_INCLUDE_DIRS}
+ ${LIBSYSFS_INCLUDE_DIRS}
+ ${LIBNL_INCLUDE_DIRS}
+ ${LIBUSB_INCLUDE_DIRS}
)
include(${QT_USE_FILE})
@@ -62,3 +63,5 @@ target_link_libraries(fbgui
${LIBUSB_LIBRARIES}
customdhcpcd
)
+
+install(TARGETS fbgui RUNTIME DESTINATION bin)