Use uppercase for the shared-object variable as well
This commit is contained in:
@@ -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
4
configure
vendored
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user