瀏覽代碼

Take care of raylib_USE_STATIC_LIBS when calling find_library

pull/789/head
myd7349 5 年之前
父節點
當前提交
5134a3b61d
共有 1 個文件被更改,包括 11 次插入4 次删除
  1. +11
    -4
      cmake/raylib-config.cmake

+ 11
- 4
cmake/raylib-config.cmake 查看文件

@ -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})

Loading…
取消
儲存