Use uppercase for the shared-object variable as well

This commit is contained in:
Roland Kaufmann
2013-03-04 21:58:36 +01:00
parent cdfe3a7b66
commit be9b33e687
2 changed files with 9 additions and 5 deletions

View File

@@ -14,12 +14,14 @@ macro (opm_defaults opm)
else (DEFINED BUILD_SHARED_LIBS)
set (_shared_def OFF)
endif (DEFINED BUILD_SHARED_LIBS)
option (BUILD_${${opm}_NAME}_SHARED "Build ${${opm}_NAME} as a shared library" ${_shared_def})
if (BUILD_${${opm}_NAME}_SHARED)
string (TOUPPER "${${opm}_NAME}" opm_UPPER)
string (REPLACE "-" "_" opm_UPPER "${opm_UPPER}")
option (BUILD_${opm_UPPER}_SHARED "Build ${${opm}_NAME} as a shared library" ${_shared_def})
if (BUILD_${opm_UPPER}_SHARED)
set (${opm}_LIBRARY_TYPE SHARED)
else (BUILD_${${opm}_NAME}_SHARED)
else (BUILD_${opm_UPPER}_SHARED)
set (${opm}_LIBRARY_TYPE STATIC)
endif (BUILD_${${opm}_NAME}_SHARED)
endif (BUILD_${opm_UPPER}_SHARED)
# precompile standard headers to speed up compilation
# unfortunately, this functionality is buggy and tends to segfault at

4
configure vendored
View File

@@ -256,8 +256,10 @@ while getopts -- ":-:" optchar; do
shared=""
;;
esac
projuppr=${project^^}
projuppr=${projuppr/-/_}
test -n "${shared}" && \
FEATURES="${FEATURES} -DBUILD_${project}_SHARED:BOOL=${shared}"
FEATURES="${FEATURES} -DBUILD_${projuppr}_SHARED:BOOL=${shared}"
;;
*)
# remove everything *after* the equal sign