mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 02:57:09 +01:00
[libconfig] redefine scandir and preventing duplicated symbols
This commit is contained in:
parent
0cae541040
commit
e4d5f93766
@ -4,6 +4,7 @@ project(libconfig C CXX)
|
|||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
|
add_compile_options(/W3 /wd4005 /wd4996 /wd4018 -D_CRT_SECURE_NO_WARNINGS)
|
||||||
|
add_definitions(-Dscandir=libconfig_scandir)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(C_SOURCES
|
set(C_SOURCES
|
||||||
@ -28,7 +29,9 @@ include_directories(${DIRENT_H})
|
|||||||
include_directories(${STDINT_H})
|
include_directories(${STDINT_H})
|
||||||
|
|
||||||
add_library(libconfig ${C_SOURCES})
|
add_library(libconfig ${C_SOURCES})
|
||||||
add_library(libconfig++ ${C_SOURCES} ${CPP_SOURCES})
|
add_library(libconfig++ ${CPP_SOURCES})
|
||||||
|
|
||||||
|
target_link_libraries(libconfig++ libconfig)
|
||||||
|
|
||||||
if(BUILD_SHARED_LIBS)
|
if(BUILD_SHARED_LIBS)
|
||||||
target_compile_definitions(libconfig PRIVATE -DLIBCONFIG_EXPORTS -DYY_NO_UNISTD_H -DYY_USE_CONST)
|
target_compile_definitions(libconfig PRIVATE -DLIBCONFIG_EXPORTS -DYY_NO_UNISTD_H -DYY_USE_CONST)
|
||||||
|
@ -44,7 +44,7 @@ extern "C" {
|
|||||||
* A pointer to the array of directory entries is stored in the location
|
* A pointer to the array of directory entries is stored in the location
|
||||||
* referenced by namelist.
|
* referenced by namelist.
|
||||||
*/
|
*/
|
||||||
int scandir(const char *dirname, struct dirent ***namelist,
|
int libconfig_scandir(const char *dirname, struct dirent ***namelist,
|
||||||
int (*select)(struct dirent *),
|
int (*select)(struct dirent *),
|
||||||
int (*compar)(struct dirent **, struct dirent **)) {
|
int (*compar)(struct dirent **, struct dirent **)) {
|
||||||
char *d;
|
char *d;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user