polybar-dwm/src/CMakeLists.txt

37 lines
961 B
CMake
Raw Normal View History

2016-06-15 03:32:35 +00:00
#
# Create library and executable
#
set(library_name lemonlib)
set(executable_name lemonbuddy)
2016-05-19 14:41:06 +00:00
2016-06-15 03:32:35 +00:00
file(GLOB_RECURSE headers RELATIVE ${PROJECT_SOURCE_DIR}/include *.h[p]*)
file(GLOB_RECURSE sources RELATIVE ${PROJECT_SOURCE_DIR}/src *.c[p]*)
list(REMOVE_ITEM sources main.cpp)
2016-05-19 14:41:06 +00:00
2016-06-15 03:32:35 +00:00
include_directories(${CMAKE_CURRENT_BINARY_DIR})
2016-06-15 03:32:35 +00:00
make_library(${library_name} STATIC
HEADER_INSTALL_DIR
lemonbuddy
HEADERS
${headers}
SOURCES
2016-10-12 00:16:48 +00:00
${sources})
2016-05-19 14:41:06 +00:00
2016-06-15 03:32:35 +00:00
make_executable(${executable_name}
SOURCES main.cpp
TARGET_DEPENDS ${library_name}_static)
target_compile_definitions(lemonbuddy PUBLIC
${X11_XCB_DEFINITIONS}
${XCB_DEFINITIONS})
configure_file(
${PROJECT_SOURCE_DIR}/include/config.hpp.cmake
${CMAKE_SOURCE_DIR}/include/config.hpp
ESCAPE_QUOTES @ONLY)
set(app_binary ${PROJECT_SOURCE_DIR}/bin/${executable_name} PARENT_SCOPE)
set(app_libraries ${XPP_LIBRARIES} PARENT_SCOPE)
set(app_include_dirs ${PROJECT_SOURCE_DIR}/include PARENT_SCOPE)