Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bindings: perl: Use ccflags from %Config for libproxy module compilation #183

Merged
merged 1 commit into from Jun 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
7 changes: 7 additions & 0 deletions bindings/perl/CMakeLists.txt
Expand Up @@ -33,6 +33,13 @@ if(PERL_FOUND AND PERLLIBS_FOUND)
OUTPUT_VARIABLE PX_PERL_ARCH)
set (PX_PERL_LIB ${PERL_SITELIB})
endif()

# PERL_EXTRA_C_FLAGS is not complete, we need full flags (including e.g.
# _FILE_OFFSET_BITS=64) for compatibility.
EXECUTE_PROCESS(COMMAND ${PERL_EXECUTABLE} -MConfig -e "print \$Config{ccflags}"
OUTPUT_VARIABLE PX_PERL_CCFLAGS)
# Convert it to a "list" suitable for target_compile_options.
string(REPLACE " " ";" PX_PERL_CCFLAGS ${PX_PERL_CCFLAGS})
endif()

add_subdirectory(lib)
Expand Down
1 change: 1 addition & 0 deletions bindings/perl/src/CMakeLists.txt
Expand Up @@ -18,6 +18,7 @@ if(PERL_LINK_LIBPERL)
endif()

target_link_libraries(PLlibproxy ${PLlibproxy_LIB_DEPENDENCIES})
target_compile_options(PLlibproxy PRIVATE ${PX_PERL_CCFLAGS})
set_target_properties(PLlibproxy PROPERTIES OUTPUT_NAME "Libproxy")
set_target_properties(PLlibproxy PROPERTIES PREFIX "")

Expand Down