Skip to content

Migrate to CMake - #3

Closed
ivan-volnov wants to merge 1 commit into
astier:masterfrom
ivan-volnov:master
Closed

ivan-volnov wants to merge 1 commit into
astier:masterfrom
ivan-volnov:master

Conversation

@ivan-volnov

Copy link
Copy Markdown

Hi,

Thanks for the app. Works great!

I had a trouble to build it on FreeBSD 14.2 with Clang. It could not find libraries and failed to compile because of CRT.

So, I just migrated to CMake.

I believe CMake is much better to build the project anywhere.

You can accept it, if you wish.

@astier

astier commented Dec 14, 2024

Copy link
Copy Markdown
Owner

I usually build it with gcc. I have no experience with clang and don't know if the CFLAGS in the Makefile are compatible with clang. I also don't have experience with cmake. Right now I don't really have time to learn new tools and compare them to make and gcc and would rather stick with make. One reason is also that I use it with Arch Linux and there gcc and make are included in base-devel (used to install AUR-packages). I don't want to install new build-tools for such a small program but rather would like to use what is already preinstalled.

I am not sure but I think regarding missing libraries the program pkg-config (also in base-devel) is commonly used to find libraries on different systems. However, right now I also don't have time to deal with pkg-config although I probably should have used it from the start and should migrate my other programs to it. Sorry for not giving BSD enough love. I will fix it sometime. Or if you want you can integrate pkg-config into the Makefile. I am sure make should also work with BSD.

@astier

astier commented Aug 31, 2026

Copy link
Copy Markdown
Owner

Thanks again for the PR and for reporting the FreeBSD build issue. I'm currently revisiting the build portability of xhidecursor.

I'd like to keep the project using a simple Makefile rather than introduce CMake as an additional build dependency for such a small program. The underlying FreeBSD issue should be solvable by making the existing Makefile handle the X11 compiler/linker paths portably.

I'll therefore close this PR, but the FreeBSD portability issue itself is something I intend to address. Thanks for bringing it to my attention.

  • Sincerely, ChatGPT

@astier astier closed this Aug 31, 2026
@astier

astier commented Aug 31, 2026

Copy link
Copy Markdown
Owner

c1d040f should fix this. could you please test if it works now on your freebsd system?
I updated the Makefile to use pkg-config for the X11 compiler and linker flags, which should provide the required X11 include path on FreeBSD. I also made a few other related portability improvements to the Makefile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants