summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--raylib.pc.in2
-rw-r--r--src/CMakeLists.txt4
-rw-r--r--utils.cmake6
3 files changed, 7 insertions, 5 deletions
diff --git a/raylib.pc.in b/raylib.pc.in
index 93984363..d71a5e2c 100644
--- a/raylib.pc.in
+++ b/raylib.pc.in
@@ -8,6 +8,6 @@ Description: Simple and easy-to-use library to learn videogames programming
URL: http://github.com/raysan5/raylib
Version: @PROJECT_VERSION@
Libs: -L${libdir} -lraylib
-Libs.private:@PKG_CONFIG_LIBS_PRIVATE@
+Libs.private: @PKG_CONFIG_LIBS_PRIVATE@
Requires.private:
Cflags: -I${includedir}
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index e9784ff4..40871455 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -137,6 +137,8 @@ if(${PLATFORM} MATCHES "PLATFORM_DESKTOP")
PUBLIC ${GRAPHICS}
)
+ set(PKG_CONFIG_LIBS_PRIVATE ${__PKG_CONFIG_LIBS_PRIVATE})
+
if (WITH_PIC)
set_property(TARGET ${RAYLIB} PROPERTY POSITION_INDEPENDENT_CODE ON)
endif()
@@ -149,7 +151,7 @@ if(${PLATFORM} MATCHES "PLATFORM_DESKTOP")
configure_file(../raylib.pc.in raylib.pc @ONLY)
install(FILES ${CMAKE_BINARY_DIR}/release/raylib.pc DESTINATION lib/pkgconfig)
-
+
# Copy the header files to the build directory
file(COPY "raylib.h" DESTINATION ".")
file(COPY "rlgl.h" DESTINATION ".")
diff --git a/utils.cmake b/utils.cmake
index dd4160d3..2c6a3771 100644
--- a/utils.cmake
+++ b/utils.cmake
@@ -74,8 +74,8 @@ foreach(L ${LIBS_PRIVATE})
set(LASTDIR ${DIR})
- set(PKG_CONFIG_LIBS_PRIVATE ${PKG_CONFIG_LIBS_PRIVATE} ${DIR_OPT} ${FILE_OPT})
- string (REPLACE ";" " " PKG_CONFIG_LIBS_PRIVATE "${PKG_CONFIG_LIBS_PRIVATE}")
+ set(__PKG_CONFIG_LIBS_PRIVATE ${__PKG_CONFIG_LIBS_PRIVATE} ${DIR_OPT} ${FILE_OPT})
+ string (REPLACE ";" " " __PKG_CONFIG_LIBS_PRIVATE "${__PKG_CONFIG_LIBS_PRIVATE}")
endforeach(L)
@@ -86,7 +86,7 @@ function(link_libraries_to_executable executable)
if (TARGET raylib_shared)
target_link_libraries(${executable} raylib_shared)
else()
- target_link_libraries(${executable} raylib ${PKG_CONFIG_LIBS_PRIVATE})
+ target_link_libraries(${executable} raylib ${__PKG_CONFIG_LIBS_PRIVATE})
endif()
endfunction()