diff --git a/.gitignore b/.gitignore index 2fca53d..020a973 100644 --- a/.gitignore +++ b/.gitignore @@ -1,6 +1,30 @@ # C++ generated headers *.gch +.out + +# Generated library +comfortable-swipe +libcomfortableswipe.a # IDE-specific .idea .vscode + +# CMake +CMakeLists.txt.user +CMakeCache.txt +CMakeFiles +CMakeScripts +Testing +Makefile +cmake_install.cmake +install_manifest.txt +compile_commands.json +CTestTestfile.cmake +_deps + +# CPack +CPack* + +# Library +.lib diff --git a/CMakeLists.txt b/CMakeLists.txt new file mode 100644 index 0000000..f6ff232 --- /dev/null +++ b/CMakeLists.txt @@ -0,0 +1,44 @@ +CMAKE_MINIMUM_REQUIRED(VERSION 3.10.2) +# find external libraries here +FIND_LIBRARY(XDO_LIB libxdo) + +# set comfortable swipe version +FILE(STRINGS "VERSION" VERSION) +ADD_DEFINITIONS(-DCOMFORTABLE_SWIPE_VERSION="${VERSION}") + +# set project +PROJECT (comfortable-swipe) + +# add our own library +ADD_LIBRARY(comfortableswipe STATIC comfortable_swipe/lib.cpp) + +# set our target library output +#SET_TARGET_PROPERTIES(comfortableswipe +# PROPERTIES +# LIBRARY_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/out/library +#) + +# set our library includes +TARGET_INCLUDE_DIRECTORIES(comfortableswipe + PUBLIC + "${CMAKE_CURRENT_SOURCE_DIR}/comfortable_swipe" +) + +# add comfortable-swipe command line program +ADD_EXECUTABLE(comfortable-swipe command_line.cpp) + +# link target libraries for program +TARGET_LINK_LIBRARIES(comfortable-swipe comfortableswipe) +TARGET_LINK_LIBRARIES(comfortable-swipe "${XDO_LIB}") + +INSTALL(TARGETS comfortable-swipe + COMPONENT linapp + RUNTIME DESTINATION "/home/rico/cf/run" + LIBRARY DESTINATION "/home/rico/cf/run" + DESTINATION "/home/rico/cf/run" +) + + +SET(CPACK_GENERATOR "DEB") +SET(CPACK_DEBIAN_PACKAGE_MAINTAINER "KK") #required +INCLUDE(CPack) diff --git a/comfortable_swipe/lib b/comfortable_swipe/lib.cpp similarity index 100% rename from comfortable_swipe/lib rename to comfortable_swipe/lib.cpp diff --git a/command_line.cpp b/command_line.cpp index 39e20f3..934f666 100644 --- a/command_line.cpp +++ b/command_line.cpp @@ -16,7 +16,7 @@ You should have received a copy of the GNU General Public License along with this program. If not, see . */ -#include "comfortable_swipe/lib" +#include "comfortable_swipe/lib.cpp" #include // std::ios #include // std::cin, std::cout, std::cerr #include // std::string diff --git a/data/comfortable-swipe.desktop b/data/comfortable-swipe.desktop new file mode 100644 index 0000000..ba486b8 --- /dev/null +++ b/data/comfortable-swipe.desktop @@ -0,0 +1,9 @@ + +[Desktop Entry] +Type=Application +Exec=comfortable-swipe start +Hidden=false +NoDisplay=false +X-GNOME-Autostart-enabled=true +Name=Comfortable Swipe +Comment=3/4-finger touchpad gestures diff --git a/defaults.conf b/data/defaults.conf similarity index 100% rename from defaults.conf rename to data/defaults.conf