2021-02-18 22:25:36 +01:00
|
|
|
cmake_minimum_required(VERSION 3.0)
|
|
|
|
|
|
|
|
project(fastfetch)
|
|
|
|
|
2021-02-22 20:36:25 +01:00
|
|
|
execute_process(
|
|
|
|
COMMAND git rev-list --count HEAD
|
|
|
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
|
|
|
OUTPUT_VARIABLE GIT_REV_LIST
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
|
|
)
|
|
|
|
execute_process(
|
|
|
|
COMMAND git rev-parse --short HEAD
|
|
|
|
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}"
|
|
|
|
OUTPUT_VARIABLE GIT_REV_PARSE
|
|
|
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
|
|
|
)
|
|
|
|
|
|
|
|
set(PROJECT_VERSION "r${GIT_REV_LIST}.${GIT_REV_PARSE}")
|
|
|
|
|
2021-02-27 14:40:03 +01:00
|
|
|
# set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall -march=native -O3 -pipe -fno-plt") # for testing
|
2021-02-22 17:14:46 +01:00
|
|
|
|
2021-02-22 20:36:25 +01:00
|
|
|
configure_file(src/fastfetch_config.h.in fastfetch_config.h)
|
2021-02-27 16:40:05 +01:00
|
|
|
include_directories(
|
|
|
|
${PROJECT_BINARY_DIR}
|
|
|
|
${PROJECT_SOURCE_DIR}/src
|
|
|
|
)
|
2021-02-22 20:36:25 +01:00
|
|
|
|
2021-02-27 18:30:05 +01:00
|
|
|
set(SRCS
|
2021-03-03 19:59:39 +01:00
|
|
|
src/common.c
|
2021-02-18 22:25:36 +01:00
|
|
|
src/logo.c
|
2021-02-27 16:40:05 +01:00
|
|
|
src/modules/break.c
|
2021-02-27 19:22:28 +01:00
|
|
|
src/modules/custom.c
|
2021-02-27 16:40:05 +01:00
|
|
|
src/modules/title.c
|
|
|
|
src/modules/seperator.c
|
|
|
|
src/modules/os.c
|
|
|
|
src/modules/host.c
|
|
|
|
src/modules/kernel.c
|
|
|
|
src/modules/uptime.c
|
|
|
|
src/modules/packages.c
|
|
|
|
src/modules/shell.c
|
|
|
|
src/modules/resolution.c
|
|
|
|
src/modules/desktopenvironment.c
|
2021-03-05 21:38:35 +01:00
|
|
|
src/modules/wm.c
|
2021-02-27 16:40:05 +01:00
|
|
|
src/modules/theme.c
|
|
|
|
src/modules/icons.c
|
|
|
|
src/modules/font.c
|
|
|
|
src/modules/terminal.c
|
|
|
|
src/modules/cpu.c
|
|
|
|
src/modules/gpu.c
|
|
|
|
src/modules/memory.c
|
|
|
|
src/modules/disk.c
|
|
|
|
src/modules/battery.c
|
|
|
|
src/modules/locale.c
|
|
|
|
src/modules/colors.c
|
2021-02-18 22:25:36 +01:00
|
|
|
)
|
|
|
|
|
2021-02-27 18:30:05 +01:00
|
|
|
add_executable(fastfetch
|
|
|
|
src/fastfetch.c
|
2021-03-03 19:59:39 +01:00
|
|
|
src/util/FFvaluestore.c
|
2021-02-27 18:30:05 +01:00
|
|
|
${SRCS}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(fastfetch
|
|
|
|
${CMAKE_DL_LIBS}
|
|
|
|
)
|
|
|
|
|
|
|
|
add_executable(flashfetch
|
|
|
|
src/flashfetch.c
|
|
|
|
${SRCS}
|
|
|
|
)
|
|
|
|
|
|
|
|
target_compile_definitions(flashfetch PUBLIC
|
|
|
|
FASTFETCH_BUILD_FLASHFETCH
|
|
|
|
)
|
|
|
|
|
|
|
|
target_link_libraries(flashfetch
|
2021-02-27 14:40:03 +01:00
|
|
|
${CMAKE_DL_LIBS}
|
2021-02-18 22:25:36 +01:00
|
|
|
)
|