From 7d6e2d5255f7458ddcfbbfbfb33e46983a89346b Mon Sep 17 00:00:00 2001 From: Haydn Date: Tue, 14 Nov 2023 10:12:20 -0800 Subject: [PATCH 1/3] turn off gui stuff for CIMG --- src/main.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.cpp b/src/main.cpp index c8dccbc..8313ac3 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,3 +1,4 @@ +#define cimg_display 0 #include "CImg.h" #include #include From d8c203018fd6847448bc7d19d5ad21364971d906 Mon Sep 17 00:00:00 2001 From: Haydn Date: Tue, 14 Nov 2023 10:12:38 -0800 Subject: [PATCH 2/3] do not link against X11 --- CMakeLists.txt | 5 ----- 1 file changed, 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 6f24b83..8d56565 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -25,13 +25,8 @@ set_source_files_properties( PROPERTIES COMPILE_FLAGS "-O2 -march=native -flto -Wall -Wextra -s") - - -find_package(X11 REQUIRED) -include_directories(${X11_INCLUDE_DIR}) include_directories("src/includes/") -target_link_libraries(cpluspalette ${X11_LIBRARIES}) install(TARGETS cpluspalette ) From ad2179b68ffcc5b95e53f842d9f931f7e19fed65 Mon Sep 17 00:00:00 2001 From: Haydn Date: Tue, 14 Nov 2023 10:14:42 -0800 Subject: [PATCH 3/3] updated build instructions --- README.md | 24 ++++-------------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/README.md b/README.md index 055aa9b..e8f16c8 100644 --- a/README.md +++ b/README.md @@ -129,10 +129,10 @@ ________________________________________________________________________________ ### What you need #### Packages -You will need [CImg](https://www.cimg.eu/index.html), [ImageMagick](https://imagemagick.org/index.php), and the X11 headers installed on your system to build this project. +You will need [CImg](https://www.cimg.eu/index.html), and [ImageMagick](https://imagemagick.org/index.php) to build this project. #### Compilers and Build tools -You will also need Cmake and the g++ compiler. +You will also need Cmake and a C++ compiler. The following section includes installation instructions for these packages for different Linux distros. @@ -140,21 +140,15 @@ The following section includes installation instructions for these packages for ### Arch and Arch-based Distros -On Arch, you can install CImg from the AUR with the following: +On Arch, you can install CImg from the official repos with the following: ```bash -yay CImg +sudo pacman -S cimg ``` -and choose the option *community/cimg*. Then install ImageMagick, which is available in the official arch repositories: ```bash sudo pacman -S imagemagick -``` -If you do not have the X11 headers, you can install them from the official repository: -```bash -sudo pacman -S libx11 - ``` ### Debian and Debian-Based Distros @@ -166,18 +160,8 @@ sudo apt install ImageMagick ```bash sudo apt install cimg-dev ``` -And the X11 headers, if you don't have them: -```bash -sudo apt install libx11-dev -``` ### Fedora and Fedora-Based Distros - -X11 headers: -```bash -sudo yum install libX11-dev -``` - Cimg: ```bash