mirror of
https://github.com/Cloudef/bemenu
synced 2025-02-03 00:11:44 +00:00
Add project skeleton
This commit is contained in:
parent
0243506448
commit
ff314f3c5e
19
CMakeLists.txt
Normal file
19
CMakeLists.txt
Normal file
@ -0,0 +1,19 @@
|
||||
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
|
||||
PROJECT(bemenu)
|
||||
SET(BEMENU_NAME "bemenu")
|
||||
SET(BEMENU_DESCRIPTION "Dynamic menu library and client program inspired by dmenu")
|
||||
SET(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${chck_SOURCE_DIR}/CMake/modules)
|
||||
|
||||
# Compile library
|
||||
ADD_SUBDIRECTORY(lib)
|
||||
|
||||
# Compile client
|
||||
ADD_SUBDIRECTORY(client)
|
||||
|
||||
# Compile tests
|
||||
ADD_SUBDIRECTORY(test)
|
||||
|
||||
# Generate documentation (make doxygen)
|
||||
ADD_SUBDIRECTORY(doxygen)
|
||||
|
||||
# vim: set ts=8 sw=4 tw=0
|
26
client/CMakeLists.txt
Normal file
26
client/CMakeLists.txt
Normal file
@ -0,0 +1,26 @@
|
||||
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY bin)
|
||||
|
||||
# Sources
|
||||
SET(CLIENT_SOURCE client.c)
|
||||
SET(CLIENT_INCLUDE)
|
||||
SET(CLIENT_LIBRARIES bemenu)
|
||||
|
||||
# Warnings
|
||||
IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-variadic-macros -Wno-long-long")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-variadic-macros -Wno-long-long")
|
||||
ENDIF ()
|
||||
|
||||
IF (UNIX AND CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
IF (${CMAKE_VERSION} VERSION_LESS 2.8.9)
|
||||
ADD_DEFINITIONS(-fPIC)
|
||||
ENDIF ()
|
||||
ENDIF ()
|
||||
|
||||
# Compile
|
||||
INCLUDE_DIRECTORIES(${CLIENT_INCLUDE})
|
||||
ADD_EXECUTABLE(client ${CLIENT_SOURCE})
|
||||
TARGET_LINK_LIBRARIES(client ${CLIENT_LIBRARIES})
|
||||
|
||||
# vim: set ts=8 sw=4 tw=0 :
|
30
client/client.c
Normal file
30
client/client.c
Normal file
@ -0,0 +1,30 @@
|
||||
/**
|
||||
* @file client.c
|
||||
*
|
||||
* Sample client using the libbemenu.
|
||||
* Also usable as dmenu replacement.
|
||||
*/
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
/**
|
||||
* Main method
|
||||
*
|
||||
* This function gives and takes the life of our program.
|
||||
*
|
||||
* @param argc Number of arguments from command line
|
||||
* @param argv Pointer to array of the arguments
|
||||
* @return exit status of the program
|
||||
*/
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
(void)argc, (void)argv;
|
||||
|
||||
/*
|
||||
* code goes here
|
||||
*/
|
||||
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
||||
/* vim: set ts=8 sw=4 tw=0 :*/
|
12
doxygen/CMakeLists.txt
Normal file
12
doxygen/CMakeLists.txt
Normal file
@ -0,0 +1,12 @@
|
||||
FIND_PACKAGE(Doxygen)
|
||||
|
||||
IF (DOXYGEN_FOUND)
|
||||
CONFIGURE_FILE(Doxyfile.in Doxyfile @ONLY)
|
||||
ADD_CUSTOM_TARGET(doxygen
|
||||
${DOXYGEN_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/Doxyfile
|
||||
WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
||||
COMMENT "Generating bemenu documentation with Doxygen" VERBATIM)
|
||||
MESSAGE("-!- Use 'make doxygen' to generate documentation")
|
||||
ENDIF (DOXYGEN_FOUND)
|
||||
|
||||
# vim: set ts=8 sw=4 tw=0 :
|
2303
doxygen/Doxyfile.in
Normal file
2303
doxygen/Doxyfile.in
Normal file
File diff suppressed because it is too large
Load Diff
30
lib/CMakeLists.txt
Normal file
30
lib/CMakeLists.txt
Normal file
@ -0,0 +1,30 @@
|
||||
SET(CMAKE_LIBRARY_OUTPUT_DIRECTORY lib)
|
||||
SET(CMAKE_ARCHIVE_OUTPUT_DIRECTORY lib)
|
||||
|
||||
# Sources
|
||||
SET(BEMENU_SOURCE
|
||||
bemenu.c
|
||||
draw/curses.c
|
||||
)
|
||||
SET(BEMENU_INCLUDE)
|
||||
SET(BEMENU_LIBRARIES)
|
||||
|
||||
# Warnings
|
||||
IF (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
|
||||
SET(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -Wextra -Wno-variadic-macros -Wno-long-long")
|
||||
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-variadic-macros -Wno-long-long")
|
||||
ENDIF ()
|
||||
|
||||
IF (UNIX AND CMAKE_COMPILER_IS_GNUCC)
|
||||
SET(CMAKE_POSITION_INDEPENDENT_CODE ON)
|
||||
IF (${CMAKE_VERSION} VERSION_LESS 2.8.9)
|
||||
ADD_DEFINITIONS(-fPIC)
|
||||
ENDIF ()
|
||||
ENDIF ()
|
||||
|
||||
# Compile
|
||||
INCLUDE_DIRECTORIES(${BEMENU_INCLUDE})
|
||||
ADD_LIBRARY(bemenu ${BEMENU_SOURCE})
|
||||
TARGET_LINK_LIBRARIES(bemenu ${BEMENU_LIBRARIES})
|
||||
|
||||
# vim: set ts=8 sw=4 tw=0 :
|
9
lib/bemenu.c
Normal file
9
lib/bemenu.c
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @file bemenu.c
|
||||
*/
|
||||
|
||||
/*
|
||||
* code goes here
|
||||
*/
|
||||
|
||||
/* vim: set ts=8 sw=4 tw=0 :*/
|
9
lib/draw/curses.c
Normal file
9
lib/draw/curses.c
Normal file
@ -0,0 +1,9 @@
|
||||
/**
|
||||
* @file curses.c
|
||||
*/
|
||||
|
||||
/*
|
||||
* code goes here
|
||||
*/
|
||||
|
||||
/* vim: set ts=8 sw=4 tw=0 :*/
|
5
test/CMakeLists.txt
Normal file
5
test/CMakeLists.txt
Normal file
@ -0,0 +1,5 @@
|
||||
INCLUDE(CTest)
|
||||
|
||||
# TODO: write test CMakeLists
|
||||
|
||||
# vim: set ts=8 sw=4 tw=0 :
|
Loading…
Reference in New Issue
Block a user