Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The install target includes all SFML options, including pkg-config and cmake configuration #39

Open
K20shores opened this issue Apr 5, 2024 · 2 comments

Comments

@K20shores
Copy link

The default installation includes all of the SFML development information. I'm

git clone https://github.com/SFML/cmake-sfml-project.git
cd cmake-sfml-project/
mkdir build && cd build
cmake ..
make -j
make install

On ubuntu this gives me

[100%] Built target sfml-audio
Install the project...
-- Install configuration: ""
CMake Error at _deps/sfml-build/cmake_install.cmake:54 (file):
  file cannot create directory: /usr/local/lib/pkgconfig.  Maybe need
  administrative privileges.
Call Stack (most recent call first):
  cmake_install.cmake:47 (include)


make: *** [Makefile:120: install] Error 1

Which, yes, with admin privileges would work. But also that would be installing SFML and not the binary. You can make this go away by specifying an install prefix cmake -DCMAKE_INSTALL_PREFIX=install .. but then you're still installing the SFML stuff.

Is that expected? If not, how can I prevent that from happening?

@K20shores
Copy link
Author

K20shores commented Apr 5, 2024

Seems like populating sfml by hand would all EXCLUDE_FROM_ALL to be added to the add_subdirectory call, but for some reason I can't get it work.

  # FetchContent_MakeAvailable(SFML)
  FetchContent_GetProperties(SFML)
  message(STATUS "SFML source dir: ${SFML_SOURCE_DIR}") 
  message(STATUS "SFML binary dir: ${SFML_BINARY_DIR}")

for me this produces empty values for the source and binary directory so I can't add the subdirectories

@eXpl0it3r
Copy link
Member

See also #28

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

No branches or pull requests

2 participants