Skip to content

Commit

Permalink
Don't look for SFML if it's already found
Browse files Browse the repository at this point in the history
This modification allows to have sfml and sfgui as submodules in a github repository and have them built by your project's CMakeLists by doing 

```
add_subdirectory("submodules/SFML")
add_subdirectory("submodules/SFGUI")
```
  • Loading branch information
lapinozz authored and eXpl0it3r committed Mar 25, 2022
1 parent a6d8e6e commit 5c29f3f
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,10 @@ option( SFML_STATIC_LIBRARIES "Do you want to link SFML statically?"

# Find packages.
find_package( OpenGL REQUIRED )
find_package( SFML 2.5 REQUIRED COMPONENTS graphics window system )

if( NOT TARGET sfml-graphics )
find_package( SFML 2.5 REQUIRED COMPONENTS graphics window system )
endif()

set( INCLUDE_PATH "${PROJECT_SOURCE_DIR}/include/" )
set( SOURCE_PATH "${PROJECT_SOURCE_DIR}/src/" )
Expand Down

0 comments on commit 5c29f3f

Please sign in to comment.