pkg-config: Empty Requires.private on shared-only build
If user doesn't build the static library, `pkg-config --static --libs raylib` should be equivalent to `pkg-config --libs raylib`.
This commit is contained in:
parent
09b022305f
commit
1be72a2e72
3 changed files with 7 additions and 5 deletions
|
@ -8,6 +8,6 @@ Description: Simple and easy-to-use library to learn videogames programming
|
||||||
URL: http://github.com/raysan5/raylib
|
URL: http://github.com/raysan5/raylib
|
||||||
Version: @PROJECT_VERSION@
|
Version: @PROJECT_VERSION@
|
||||||
Libs: -L${libdir} -lraylib
|
Libs: -L${libdir} -lraylib
|
||||||
Libs.private:@PKG_CONFIG_LIBS_PRIVATE@
|
Libs.private: @PKG_CONFIG_LIBS_PRIVATE@
|
||||||
Requires.private:
|
Requires.private:
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
|
|
@ -137,6 +137,8 @@ if(${PLATFORM} MATCHES "PLATFORM_DESKTOP")
|
||||||
PUBLIC ${GRAPHICS}
|
PUBLIC ${GRAPHICS}
|
||||||
)
|
)
|
||||||
|
|
||||||
|
set(PKG_CONFIG_LIBS_PRIVATE ${__PKG_CONFIG_LIBS_PRIVATE})
|
||||||
|
|
||||||
if (WITH_PIC)
|
if (WITH_PIC)
|
||||||
set_property(TARGET ${RAYLIB} PROPERTY POSITION_INDEPENDENT_CODE ON)
|
set_property(TARGET ${RAYLIB} PROPERTY POSITION_INDEPENDENT_CODE ON)
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -74,8 +74,8 @@ foreach(L ${LIBS_PRIVATE})
|
||||||
|
|
||||||
set(LASTDIR ${DIR})
|
set(LASTDIR ${DIR})
|
||||||
|
|
||||||
set(PKG_CONFIG_LIBS_PRIVATE ${PKG_CONFIG_LIBS_PRIVATE} ${DIR_OPT} ${FILE_OPT})
|
set(__PKG_CONFIG_LIBS_PRIVATE ${__PKG_CONFIG_LIBS_PRIVATE} ${DIR_OPT} ${FILE_OPT})
|
||||||
string (REPLACE ";" " " PKG_CONFIG_LIBS_PRIVATE "${PKG_CONFIG_LIBS_PRIVATE}")
|
string (REPLACE ";" " " __PKG_CONFIG_LIBS_PRIVATE "${__PKG_CONFIG_LIBS_PRIVATE}")
|
||||||
endforeach(L)
|
endforeach(L)
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,7 +86,7 @@ function(link_libraries_to_executable executable)
|
||||||
if (TARGET raylib_shared)
|
if (TARGET raylib_shared)
|
||||||
target_link_libraries(${executable} raylib_shared)
|
target_link_libraries(${executable} raylib_shared)
|
||||||
else()
|
else()
|
||||||
target_link_libraries(${executable} raylib ${PKG_CONFIG_LIBS_PRIVATE})
|
target_link_libraries(${executable} raylib ${__PKG_CONFIG_LIBS_PRIVATE})
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue