diff options
-rw-r--r-- | CMakeLists.txt | 11 | ||||
-rw-r--r-- | README.cmake | 3 |
2 files changed, 12 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index e2ff1ed783..5605ab0a0d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -482,6 +482,9 @@ ELSE() CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/os/win32/modules.c ${PROJECT_BINARY_DIR}/ COPYONLY) ENDIF() +# for easy reference from .dll/.so builds +CONFIGURE_FILE(os/win32/BaseAddr.ref ${PROJECT_BINARY_DIR}/ COPYONLY) + ADD_EXECUTABLE(gen_test_char server/gen_test_char.c) GET_TARGET_PROPERTY(GEN_TEST_CHAR_EXE gen_test_char LOCATION) ADD_CUSTOM_COMMAND( @@ -690,7 +693,10 @@ FOREACH (mod ${MODULE_PATHS}) SET(install_modules ${install_modules} ${mod_name}) SET(install_modules_pdb ${install_modules_pdb} "${PROJECT_BINARY_DIR}/${mod_name}.pdb") SET(mod_extra_libs "${mod_name}_extra_libs") - SET_TARGET_PROPERTIES(${mod_name} PROPERTIES SUFFIX .so) + SET_TARGET_PROPERTIES(${mod_name} PROPERTIES + SUFFIX .so + LINK_FLAGS /base:@${PROJECT_BINARY_DIR}/BaseAddr.ref,${mod_name}.so + ) TARGET_LINK_LIBRARIES(${mod_name} ${${mod_extra_libs}} libhttpd ${APR_LIBRARIES} ${HTTPD_SYSTEM_LIBS}) # Extra defines? @@ -712,6 +718,9 @@ ENDFOREACH() ########### HTTPD LIBRARIES ############ ADD_LIBRARY(libhttpd SHARED ${LIBHTTPD_SOURCES}) +SET_TARGET_PROPERTIES(libhttpd PROPERTIES + LINK_FLAGS /base:@${PROJECT_BINARY_DIR}/BaseAddr.ref,libhttpd.dll +) SET(install_targets ${install_targets} libhttpd) SET(install_bin_pdb ${install_bin_pdb} ${PROJECT_BINARY_DIR}/libhttpd.pdb) TARGET_LINK_LIBRARIES(libhttpd ${APR_LIBRARIES} ${PCRE_LIBRARIES} ${HTTPD_SYSTEM_LIBS}) diff --git a/README.cmake b/README.cmake index e0a33b69e8..52db0e4637 100644 --- a/README.cmake +++ b/README.cmake @@ -278,9 +278,10 @@ Known Bugs and Limitations * no support for static support library builds; unclear if that is a requirement; if so: taking PCRE as an example, we'd need to detect that it is static and then turn on PCRE_STATIC for the libhttpd build -* module base addresses aren't set * program attributes like descriptive name and version aren't set for most binaries +* build/cpR_noreplace.pl doesn't declare what version of Perl is required + and doesn't work with File::Path that is missing make_path Generally: |