2016-06-15 03:32:35 +00:00
|
|
|
#
|
2017-01-26 16:17:02 +00:00
|
|
|
# Configure src
|
2016-06-15 03:32:35 +00:00
|
|
|
#
|
2016-05-19 14:41:06 +00:00
|
|
|
|
2017-01-26 16:17:02 +00:00
|
|
|
# Source tree {{{
|
2016-11-03 18:01:45 +00:00
|
|
|
|
2017-01-26 16:17:02 +00:00
|
|
|
file(GLOB_RECURSE files RELATIVE ${CMAKE_CURRENT_LIST_DIR} *.c[p]*)
|
|
|
|
list(REMOVE_ITEM files ipc.cpp)
|
2016-10-24 23:46:26 +00:00
|
|
|
|
2017-01-26 16:17:02 +00:00
|
|
|
if(NOT ENABLE_ALSA)
|
|
|
|
list(REMOVE_ITEM files modules/volume.cpp)
|
|
|
|
list(REMOVE_ITEM files adapters/alsa/control.cpp)
|
|
|
|
list(REMOVE_ITEM files adapters/alsa/mixer.cpp)
|
2016-11-02 19:22:45 +00:00
|
|
|
endif()
|
2017-01-26 16:17:02 +00:00
|
|
|
if(NOT ENABLE_CURL)
|
|
|
|
list(REMOVE_ITEM files modules/github.cpp)
|
|
|
|
list(REMOVE_ITEM files utils/http.cpp)
|
2016-11-02 19:22:45 +00:00
|
|
|
endif()
|
2017-01-26 16:17:02 +00:00
|
|
|
if(NOT ENABLE_MPD)
|
|
|
|
list(REMOVE_ITEM files modules/mpd.cpp)
|
|
|
|
list(REMOVE_ITEM files adapters/mpd.cpp)
|
2016-11-02 19:22:45 +00:00
|
|
|
endif()
|
2017-01-26 16:17:02 +00:00
|
|
|
if(NOT ENABLE_NETWORK)
|
|
|
|
list(REMOVE_ITEM files modules/network.cpp)
|
|
|
|
list(REMOVE_ITEM files adapters/net.cpp)
|
2016-11-26 14:42:48 +00:00
|
|
|
endif()
|
2017-01-26 16:17:02 +00:00
|
|
|
if(NOT ENABLE_I3)
|
|
|
|
list(REMOVE_ITEM files modules/i3.cpp)
|
|
|
|
list(REMOVE_ITEM files utils/i3.cpp)
|
2016-11-30 09:06:16 +00:00
|
|
|
endif()
|
2017-01-26 16:17:02 +00:00
|
|
|
if(NOT WITH_XRANDR)
|
|
|
|
list(REMOVE_ITEM files x11/extensions/randr.cpp)
|
2016-11-26 14:42:48 +00:00
|
|
|
endif()
|
2017-01-26 16:17:02 +00:00
|
|
|
if(NOT WITH_XRENDER)
|
|
|
|
list(REMOVE_ITEM files x11/extensions/render.cpp)
|
2017-01-20 01:25:54 +00:00
|
|
|
endif()
|
2017-01-26 16:17:02 +00:00
|
|
|
if(NOT WITH_XDAMAGE)
|
|
|
|
list(REMOVE_ITEM files x11/extensions/damage.cpp)
|
2016-10-24 23:46:26 +00:00
|
|
|
endif()
|
2017-01-26 16:17:02 +00:00
|
|
|
if(NOT WITH_XSYNC)
|
|
|
|
list(REMOVE_ITEM files x11/extensions/sync.cpp)
|
2016-10-24 23:46:26 +00:00
|
|
|
endif()
|
2017-01-26 16:17:02 +00:00
|
|
|
if(NOT WITH_XCOMPOSITE)
|
|
|
|
list(REMOVE_ITEM files x11/extensions/composite.cpp)
|
2016-10-24 23:46:26 +00:00
|
|
|
endif()
|
2017-01-26 16:17:02 +00:00
|
|
|
if(NOT WITH_XKB)
|
|
|
|
list(REMOVE_ITEM files x11/extensions/xkb.cpp)
|
2016-10-24 23:46:26 +00:00
|
|
|
endif()
|
2017-01-26 16:17:02 +00:00
|
|
|
if(NOT WITH_XRM)
|
|
|
|
list(REMOVE_ITEM files x11/xresources.cpp)
|
2016-12-19 21:01:37 +00:00
|
|
|
endif()
|
2017-09-06 06:35:29 +00:00
|
|
|
if(NOT WITH_XCURSOR)
|
|
|
|
list(REMOVE_ITEM files x11/cursor.cpp)
|
|
|
|
endif()
|
2016-12-19 21:01:37 +00:00
|
|
|
|
|
|
|
# }}}
|
|
|
|
|
2017-01-26 16:17:02 +00:00
|
|
|
# Target: polybar {{{
|
2016-11-20 22:04:31 +00:00
|
|
|
|
2017-01-26 16:17:02 +00:00
|
|
|
make_executable(polybar
|
|
|
|
SOURCES
|
|
|
|
${files}
|
2016-11-20 22:04:31 +00:00
|
|
|
INCLUDE_DIRS
|
2017-01-26 16:17:02 +00:00
|
|
|
${dirs}
|
2016-11-20 22:04:31 +00:00
|
|
|
RAW_DEPENDS
|
2017-01-26 16:17:02 +00:00
|
|
|
${libs}
|
|
|
|
Threads::Threads)
|
2016-11-20 22:04:31 +00:00
|
|
|
|
2017-01-26 16:17:02 +00:00
|
|
|
target_compile_options(polybar PUBLIC $<$<CXX_COMPILER_ID:GNU>:$<$<CONFIG:MinSizeRel>:-flto>>)
|
2016-11-20 22:04:31 +00:00
|
|
|
|
|
|
|
# }}}
|
2017-01-26 16:17:02 +00:00
|
|
|
# Target: polybar-msg {{{
|
2017-01-10 01:09:27 +00:00
|
|
|
|
|
|
|
if(BUILD_IPC_MSG)
|
2017-01-26 16:17:02 +00:00
|
|
|
make_executable(polybar-msg
|
|
|
|
SOURCES
|
|
|
|
ipc.cpp
|
|
|
|
utils/env.cpp
|
2017-09-04 21:00:35 +00:00
|
|
|
utils/file.cpp
|
|
|
|
utils/string.cpp)
|
2017-01-26 16:17:02 +00:00
|
|
|
target_compile_options(polybar-msg PUBLIC $<$<CXX_COMPILER_ID:GNU>:$<$<CONFIG:MinSizeRel>:-flto>>)
|
2017-01-10 01:09:27 +00:00
|
|
|
endif()
|
|
|
|
|
|
|
|
# }}}
|
2016-10-24 23:46:26 +00:00
|
|
|
|
2017-01-26 16:17:02 +00:00
|
|
|
set(libs ${libs} PARENT_SCOPE)
|
|
|
|
set(dirs ${dirs} PARENT_SCOPE)
|