[cmake] generate full buildflags.h CFLAGS
Combine current configuration flags with CMAKE_C_FLAGS
This commit is contained in:
parent
98f4a2b022
commit
aa9b03df25
@ -38,6 +38,12 @@ if (WIN32)
|
||||
string(REPLACE "\\" "\\\\" NATIVE_FREERDP_PROXY_PLUGINDIR "${NATIVE_FREERDP_PROXY_PLUGINDIR}")
|
||||
endif()
|
||||
|
||||
set(C_FLAGS ${CMAKE_C_FLAGS})
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" CAPS_BUILD_TYPE)
|
||||
string(APPEND C_FLAGS " ${CMAKE_C_FLAGS_${CAPS_BUILD_TYPE}}")
|
||||
endif()
|
||||
|
||||
cleaning_configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp/version.h)
|
||||
cleaning_configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config/build-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp/build-config.h)
|
||||
cleaning_configure_file(${CMAKE_CURRENT_SOURCE_DIR}/config/config.h.in ${CMAKE_CURRENT_BINARY_DIR}/freerdp/config.h)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef FREERDP_BUILD_FLAGS_H
|
||||
#define FREERDP_BUILD_FLAGS_H
|
||||
|
||||
#define FREERDP_CFLAGS "${CMAKE_C_FLAGS}"
|
||||
#define FREERDP_CFLAGS "${C_FLAGS}"
|
||||
#define FREERDP_COMPILER_ID "${CMAKE_C_COMPILER_ID}"
|
||||
#define FREERDP_COMPILER_VERSION "${CMAKE_C_COMPILER_VERSION}"
|
||||
#define FREERDP_TARGET_ARCH "${TARGET_ARCH}"
|
||||
|
@ -32,6 +32,13 @@ FOREACH(var ${res})
|
||||
LIST(APPEND UWAC_BUILD_CONFIG_LIST "${var}=${${var}}")
|
||||
ENDIF()
|
||||
ENDFOREACH()
|
||||
|
||||
set(C_FLAGS ${CMAKE_C_FLAGS})
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" CAPS_BUILD_TYPE)
|
||||
string(APPEND C_FLAGS " ${CMAKE_C_FLAGS_${CAPS_BUILD_TYPE}}")
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" " " UWAC_BUILD_CONFIG "${UWAC_BUILD_CONFIG_LIST}")
|
||||
cleaning_configure_file(version.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/version.h)
|
||||
cleaning_configure_file(buildflags.h.in ${CMAKE_CURRENT_BINARY_DIR}/../include/uwac/buildflags.h)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef UWAC_BUILD_FLAGS_H
|
||||
#define UWAC_BUILD_FLAGS_H
|
||||
|
||||
#define UWAC_CFLAGS "${CMAKE_C_FLAGS}"
|
||||
#define UWAC_CFLAGS "${C_FLAGS}"
|
||||
#define UWAC_COMPILER_ID "${CMAKE_C_COMPILER_ID}"
|
||||
#define UWAC_COMPILER_VERSION "${CMAKE_C_COMPILER_VERSION}"
|
||||
#define UWAC_TARGET_ARCH "${TARGET_ARCH}"
|
||||
|
@ -15,6 +15,12 @@
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set(C_FLAGS ${CMAKE_C_FLAGS})
|
||||
if (CMAKE_BUILD_TYPE)
|
||||
string(TOUPPER "${CMAKE_BUILD_TYPE}" CAPS_BUILD_TYPE)
|
||||
string(APPEND C_FLAGS " ${CMAKE_C_FLAGS_${CAPS_BUILD_TYPE}}")
|
||||
endif()
|
||||
|
||||
cleaning_configure_file(config/version.h.in ${CMAKE_CURRENT_BINARY_DIR}/winpr/version.h)
|
||||
cleaning_configure_file(config/wtypes.h.in ${CMAKE_CURRENT_BINARY_DIR}/winpr/wtypes.h)
|
||||
cleaning_configure_file(config/build-config.h.in ${CMAKE_CURRENT_BINARY_DIR}/winpr/build-config.h)
|
||||
|
@ -1,7 +1,7 @@
|
||||
#ifndef WINPR_BUILD_FLAGS_H
|
||||
#define WINPR_BUILD_FLAGS_H
|
||||
|
||||
#define WINPR_CFLAGS "${CMAKE_C_FLAGS}"
|
||||
#define WINPR_CFLAGS "${C_FLAGS}"
|
||||
#define WINPR_COMPILER_ID "${CMAKE_C_COMPILER_ID}"
|
||||
#define WINPR_COMPILER_VERSION "${CMAKE_C_COMPILER_VERSION}"
|
||||
#define WINPR_TARGET_ARCH "${TARGET_ARCH}"
|
||||
|
Loading…
Reference in New Issue
Block a user