Skip to content

Commit

Permalink
Take care of raylib_USE_STATIC_LIBS when calling find_library
Browse files Browse the repository at this point in the history
  • Loading branch information
myd7349 committed Apr 9, 2019
1 parent 61181f2 commit 5134a3b
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions cmake/raylib-config.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@ find_path(raylib_INCLUDE_DIR
HINTS ${${XPREFIX}_INCLUDE_DIRS}
)

find_library(raylib_LIBRARY
NAMES raylib raylib_static
HINTS ${${XPREFIX}_LIBRARY_DIRS}
)
if (raylib_USE_STATIC_LIBS)
find_library(raylib_LIBRARY
NAMES raylib_static
HINTS ${${XPREFIX}_LIBRARY_DIRS}
)
else ()
find_library(raylib_LIBRARY
NAMES raylib
HINTS ${${XPREFIX}_LIBRARY_DIRS}
)
endif ()

set(raylib_LIBRARIES ${raylib_LIBRARY})
set(raylib_LIBRARY_DIRS ${${XPREFIX}_LIBRARY_DIRS})
Expand Down

0 comments on commit 5134a3b

Please sign in to comment.