Skip to content

Commit 27eadf2

Browse files
committed
Properly handle pkgconfig files on FreeBSD
1 parent f1431e4 commit 27eadf2

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,6 +165,10 @@ if(SFML_OS_MACOSX)
165165
endif()
166166

167167
if(SFML_OS_LINUX OR SFML_OS_FREEBSD)
168+
set(PKGCONFIG_DIR lib${LIB_SUFFIX}/pkgconfig)
169+
if(SFML_OS_FREEBSD)
170+
set(PKGCONFIG_DIR libdata/pkgconfig)
171+
endif()
168172
if(BUILD_SHARED_LIBS)
169173
sfml_set_option(SFML_INSTALL_PKGCONFIG_FILES FALSE BOOL "TRUE to automatically install pkg-config files so other projects can find SFML")
170174
if(SFML_INSTALL_PKGCONFIG_FILES)
@@ -174,7 +178,7 @@ if(SFML_OS_LINUX OR SFML_OS_FREEBSD)
174178
"tools/pkg-config/sfml-${sfml_module}.pc"
175179
@ONLY)
176180
INSTALL(FILES "${CMAKE_CURRENT_BINARY_DIR}/tools/pkg-config/sfml-${sfml_module}.pc"
177-
DESTINATION "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/pkgconfig")
181+
DESTINATION "${CMAKE_INSTALL_PREFIX}/${PKGCONFIG_DIR}")
178182
endforeach()
179183
endif()
180184
else()

0 commit comments

Comments
 (0)