Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,8 @@
*.coverage
*.coveragexml
main
compile_commands.json
LittleWeatherApp
LittleWeatherApp_debug
compile_commands.json

build
35 changes: 35 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
cmake_minimum_required(VERSION 3.16)

project(LittleWeatherApp VERSION 1.0.0 LANGUAGES CXX)

set(CMAKE_CXX_STANDARD 23)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)

include(CheckCXXCompilerFlag)

add_executable(${PROJECT_NAME}
src/atlas.h
src/client.cpp
src/main.cpp
src/parser.cpp
src/settings.cpp
src/ui.cpp
src/wallpaper.cpp
)

target_include_directories(${PROJECT_NAME}
PRIVATE
${CMAKE_CURRENT_SOURCE_DIR}/third-party
)

target_link_libraries(${PROJECT_NAME}
PRIVATE
-lraylib
-lGL
-lm
-lpthread
-ldl
-lrt
-lX11
)
36 changes: 36 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
BUILD_DIR ?= build
BUILD_TYPE ?= Release
JOBS ?= $(shell nproc)

APP_NAME = LittleWeatherApp

help:
@echo "Usage: make [target]"
@echo "Targets:"
@echo " build-release Build the project in Release mode"
@echo " build-debug Build the project in Debug mode"
@echo " clean Remove the build directory"


.PHONY: all clean
clean:
rm -rf $(BUILD_DIR)

configure:
@echo "Configuring the project with CMake..."
@echo "Build directory: $(BUILD_DIR)/$(BUILD_TYPE)"
@echo "Build type: $(BUILD_TYPE)"
@cmake -S . -B $(BUILD_DIR)/$(BUILD_TYPE) -DCMAKE_BUILD_TYPE=$(BUILD_TYPE)


.PHONY: build-release
build-release: BUILD_TYPE = Release
build-release: configure
cmake --build $(BUILD_DIR)/$(BUILD_TYPE) --config Release -- -j$(JOBS)
cp $(BUILD_DIR)/$(BUILD_TYPE)/$(APP_NAME) ./$(APP_NAME)

.PHONY: build-debug
build-debug: BUILD_TYPE = Debug
build-debug: configure
cmake --build $(BUILD_DIR)/$(BUILD_TYPE) --config Debug -- -j$(JOBS)
cp $(BUILD_DIR)/$(BUILD_TYPE)/$(APP_NAME) ./$(APP_NAME)_debug
8 changes: 6 additions & 2 deletions dev_update.sh
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
#!/bin/bash
bear -- clang++ src/*.cpp -std=c++17 -I/usr/local/include -g -o main \
-lraylib -lGL -lm -lpthread -ldl -lrt -lX11
bear -- clang++ src/*.cpp \
-std=c++17 \
-I/usr/local/include \
-Ithird-party \
-lraylib -lGL -lm -lpthread -ldl -lrt -lX11 \
-g -o main
File renamed without changes.
File renamed without changes.