This forum has been archived. All content is frozen. Please use KDE Discuss instead.

cmake for service menu ?

Tags: None
(comma "," separated)
nowardev
Registered Member
Posts
244
Karma
0
OS

cmake for service menu ?

Wed Apr 11, 2012 8:22 am
i would like create a debian package with cmake and cpack it works but i have a problem with the build folder


Code: Select all
##Cmake template for service menus

cmake_minimum_required(VERSION 2.8)
#SET THE NAME FOR YOUR SERVICE MENU
PROJECT("kate-folder-servicemenu")
SET (CMAKE_PROJECT_NAME "kate-folder-servicemenu")
#search for the minimal version of kde 4.0
find_package(KDE4 4.0.0 REQUIRED)

include(KDE4Defaults)

#install the service menu on the correct folder
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/usr/share/kde4/services/ServiceMenus/kate-folder.desktop DESTINATION
${SERVICES_INSTALL_DIR}/ServiceMenus )
 
 #install the script where you should be
 INSTALL(PROGRAMS ${CMAKE_CURRENT_SOURCE_DIR}/usr/bin/ktexeditor-open-folder
  DESTINATION bin)


SET(MAJOR_VERSION "1")
SET(MINOR_VERSION "0")
SET(PATCH_VERSION "0")

IF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")
INCLUDE(InstallRequiredSystemLibraries)

SET(CPACK_SET_DESTDIR "on")
SET(CPACK_PACKAGING_INSTALL_PREFIX "/tmp")
SET(CPACK_GENERATOR "DEB")

SET(CPACK_PACKAGE_DESCRIPTION "kate service menu for folders")
SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "It's a service menu for dolphin that allow you to open folders skipping no-text files")
SET(CPACK_PACKAGE_VENDOR "nowardev")
SET(CPACK_PACKAGE_CONTACT "nowardev@gmail.com")
SET(CPACK_PACKAGE_VERSION_MAJOR "${MAJOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_MINOR "${MINOR_VERSION}")
SET(CPACK_PACKAGE_VERSION_PATCH "${PATCH_VERSION}")
SET(CPACK_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}.${CPACK_PACKAGE_VERSION_PATCH}")
SET(CPACK_SOURCE_PACKAGE_FILE_NAME "${CMAKE_PROJECT_NAME}_${MAJOR_VERSION}.${MINOR_VERSION}.${CPACK_PACKAGE_VERSION_PATCH}")
#demo dependencies
#SET(CPACK_DEBIAN_PACKAGE_DEPENDS " kate , plasma-desktop, libc6 (>= 2.1.3) ")

#dependencies for this service menu
SET(CPACK_DEBIAN_PACKAGE_DEPENDS " kate , dolphin ")
 
SET(CPACK_DEBIAN_PACKAGE_PRIORITY "optional")
SET(CPACK_DEBIAN_PACKAGE_SECTION "kde")
SET(CPACK_DEBIAN_ARCHITECTURE ${CMAKE_SYSTEM_PROCESSOR})

SET(CPACK_COMPONENTS_ALL Libraries ApplicationData)
INCLUDE(CPack)

ENDIF(EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake")

 
 
 
 


but now .... when i do

mkdir build ; cd build ; cmake -DCMAKE_INSTALL_PREFIX:PATH=/usr .. ; cpack ..

it says

Build files have been written to: /home/shared/kate-folder-service-menu
CPack Error: CPack generator not specified

and infact i have the stuff on


/home/shared/kate-folder-service-menu

and not on /home/shared/kate-folder-service-menu/build

so cpack says no :D

help?

without the build stuff i can create my little debian package without problems
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: cmake for service menu ?  Topic is solved

Fri Apr 13, 2012 2:29 am
Have you tried creating a new build directory?


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
nowardev
Registered Member
Posts
244
Karma
0
OS

Re: cmake for service menu ?

Fri Apr 13, 2012 6:34 am
the problem it's cmake because it creates all the stuff here


/home/shared/kate-folder-service-menu


instead here , after i did cmake

/home/shared/kate-folder-service-menu/build

is empty ! :o

EDIT :

:D

i did all the stuff again mmm removed build folder cleaned all /home/shared/kate-folder-service-menu :D it works

thank you :D i had the old stuff .... wtf xD
User avatar
bcooksley
Administrator
Posts
19765
Karma
87
OS

Re: cmake for service menu ?

Fri Apr 13, 2012 10:00 am
This is very unusual. I cannot see anything in CMakeLists.txt file which would cause this.

Please make sure your source directory does not contain a CMakeCache.txt file.


KDE Sysadmin
[img]content/bcooksley_sig.png[/img]
nowardev
Registered Member
Posts
244
Karma
0
OS

Re: cmake for service menu ?

Fri Apr 13, 2012 2:57 pm
bcooksley wrote:This is very unusual. I cannot see anything in CMakeLists.txt file which would cause this.

Please make sure your source directory does not contain a CMakeCache.txt file.



bcooksley

thank you for your efforts :D , but like i have said before i had some oold stuff in the main folder now , afer deleting all old Cmake fiels , it works fine :D


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot]