Browse Source

Fix inconsistent variables for compile options/definitions

So these options/definitions should no longer be missing in some
places, e.g. the pkg-config file.
charconv
Martchus 2 years ago
parent
commit
e9803a41dc
  1. 10
      cmake/modules/LibraryTarget.cmake

10
cmake/modules/LibraryTarget.cmake

@ -146,8 +146,8 @@ else ()
PRIVATE "${META_PRIVATE_COMPILE_DEFINITIONS}")
target_compile_options(
${META_TARGET_NAME}
PUBLIC "${META_PUBLIC_LIB_COMPILE_OPTIONS}"
PRIVATE "${META_PRIVATE_LIB_COMPILE_OPTIONS}")
PUBLIC "${META_PUBLIC_COMPILE_OPTIONS}"
PRIVATE "${META_PRIVATE_COMPILE_OPTIONS}")
set_target_properties(
${META_TARGET_NAME}
PROPERTIES VERSION "${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH}"
@ -189,9 +189,9 @@ if (META_HEADER_ONLY_LIB)
INTERFACE $<BUILD_INTERFACE:${TARGET_INCLUDE_DIRECTORY_BUILD_INTERFACE}>
$<INSTALL_INTERFACE:${HEADER_INSTALL_DESTINATION}> ${PUBLIC_INCLUDE_DIRS})
target_compile_definitions(${META_TARGET_NAME}_interface_sources_for_qtcreator
INTERFACE "${META_PUBLIC_LIB_COMPILE_DEFINITIONS}" "${META_PRIVATE_LIB_COMPILE_DEFINITIONS}")
INTERFACE "${META_PUBLIC_COMPILE_DEFINITIONS}" "${META_PRIVATE_COMPILE_DEFINITIONS}")
target_compile_options(${META_TARGET_NAME}_interface_sources_for_qtcreator
INTERFACE "${META_PUBLIC_LIB_COMPILE_OPTIONS}" "${META_PRIVATE_LIB_COMPILE_OPTIONS}")
INTERFACE "${META_PUBLIC_COMPILE_OPTIONS}" "${META_PRIVATE_COMPILE_OPTIONS}")
set_target_properties(
${META_TARGET_NAME}_interface_sources_for_qtcreator
PROPERTIES VERSION "${META_VERSION_MAJOR}.${META_VERSION_MINOR}.${META_VERSION_PATCH}" SOVERSION "${META_SOVERSION}"
@ -356,7 +356,7 @@ endif ()
# compute other values for pkg-config
set(META_PROJECT_NAME_FOR_PC "${META_PROJECT_NAME}${META_CONFIG_SUFFIX}")
foreach (COMPILE_DEFINITION ${META_PUBLIC_LIB_COMPILE_DEFINITIONS})
foreach (COMPILE_DEFINITION ${META_PUBLIC_COMPILE_DEFINITIONS})
set(META_COMPILE_DEFINITIONS_FOR_PC "${META_COMPILE_DEFINITIONS_FOR_PC} -D${COMPILE_DEFINITION}")
endforeach ()

Loading…
Cancel
Save