~cairo-dock-team/ubuntu/precise/cairo-dock-plug-ins/3.0.0.0rc1

« back to all changes in this revision

Viewing changes to generate-new-applet.sh

  • Committer: Kees Cook
  • Date: 2011-08-11 23:17:39 UTC
  • mfrom: (20.1.1 cairo-dock-plug-ins)
  • Revision ID: kees@outflux.net-20110811231739-cteedan51tmdg77v
Tags: 2.4.0~0beta2-0ubuntu1
releasing version 2.4.0~0beta2-0ubuntu1

Show diffs side-by-side

added added

removed removed

Lines of Context:
50
50
 
51
51
echo "" >> CMakeLists.txt
52
52
echo "############# $UpperName #################" >> CMakeLists.txt
 
53
echo "set (with_${LowerName} \"no\")" >> CMakeLists.txt
53
54
echo "if (\"\${enable-${LowerName}}\" STREQUAL \"yes\")" >> CMakeLists.txt
 
55
echo "  message (STATUS \"> $AppletName:\")" >> CMakeLists.txt
54
56
echo "  set (GETTEXT_$UpperName \${GETTEXT_PLUGINS})" >> CMakeLists.txt
55
57
echo "  set (VERSION_$UpperName \"0.0.1\")" >> CMakeLists.txt
56
58
echo "  set (PACKAGE_$UpperName \"cd-$AppletName\")" >> CMakeLists.txt
57
 
echo "  set (${LowerName}datadir \"\${pluginsdatadir}/$AppletName\")" >> CMakeLists.txt
58
 
echo "  configure_file ($AppletName/data/$AppletName.conf.in \${CMAKE_CURRENT_SOURCE_DIR}/$AppletName/data/$AppletName.conf)" >> CMakeLists.txt
 
59
echo "  set (with_${LowerName} \"yes\")" >> CMakeLists.txt
 
60
echo "  set (""${LowerName}""datadir \"\${pluginsdatadir}/$AppletName\")" >> CMakeLists.txt
 
61
echo "  configure_file (\${CMAKE_CURRENT_SOURCE_DIR}/$AppletName/data/$AppletName.conf.in \${CMAKE_CURRENT_BINARY_DIR}/$AppletName/data/$AppletName.conf)" >> CMakeLists.txt
59
62
echo "  add_subdirectory ($AppletName)" >> CMakeLists.txt
60
63
echo "endif()" >> CMakeLists.txt
 
64
echo "" >> CMakeLists.txt
 
65
echo "message (STATUS \" - with $AppletName applet:            \${with_""${LowerName}""}\")" >> CMakeLists.txt
61
66
 
62
 
cmake -DCMAKE_INSTALL_PREFIX=/usr -D$AppletName=yes
 
67
echo "Compile it in the build directory" # not in the parent directory: it's cleaner to compile it there (yes I'm sure Fab ;) )
 
68
mkdir -p build
 
69
cd build
 
70
cmake .. -DCMAKE_INSTALL_PREFIX=/usr -Denable-${LowerName}=yes
63
71
make
64
72
 
65
73
echo "Applet $AppletName has been generated."
66
74
echo "Now its' your turn ! type 'sudo make install' to install your applet."
 
75
echo "Use this command to compile it: mkdir -p build; cd build; cmake .. -DCMAKE_INSTALL_PREFIX=/usr -Denable-${LowerName}=yes; make"
 
76
echo "You can launch the 'make' commands only in this directory if you want: build/$AppletName"