Improve cmake config file generation
This allows for finding raylib on a non-standard location (eg, not in /usr/lib{,64})
This commit is contained in:
parent
79188f570b
commit
246ec831df
1 changed files with 33 additions and 106 deletions
|
|
@ -17,7 +17,12 @@ if(NOT glfw3_FOUND AND NOT USE_EXTERNAL_GLFW STREQUAL "ON" AND "${PLATFORM}" MAT
|
|||
set(GLFW_BUILD_EXAMPLES OFF CACHE BOOL "" FORCE)
|
||||
set(GLFW_INSTALL OFF CACHE BOOL "" FORCE)
|
||||
set(GLFW_LIBRARY_TYPE "OBJECT" CACHE STRING "" FORCE)
|
||||
|
||||
|
||||
|
||||
if (NOT BUILD_SHARED_LIBS)
|
||||
message(STATUS "Enabling install of GLFW static libs because raylib will be built statically")
|
||||
set(GLFW_INSTALL ON CACHE BOOL "" FORCE)
|
||||
endif ()
|
||||
|
||||
add_subdirectory(external/glfw)
|
||||
|
||||
|
|
@ -25,7 +30,7 @@ if(NOT glfw3_FOUND AND NOT USE_EXTERNAL_GLFW STREQUAL "ON" AND "${PLATFORM}" MAT
|
|||
if (BUILD_SHARED_LIBS)
|
||||
set_property(TARGET glfw PROPERTY C_VISIBILITY_PRESET hidden)
|
||||
endif()
|
||||
|
||||
|
||||
list(APPEND raylib_sources $<TARGET_OBJECTS:glfw>)
|
||||
include_directories(BEFORE SYSTEM external/glfw/include)
|
||||
elseif("${PLATFORM}" STREQUAL "DRM")
|
||||
|
|
|
|||
Loading…
Reference in a new issue