core-utils - rework link_libraries and include_directories propagation

By properly marking certain parameters as private or public
we can have cmake work out most of the link_libraries and
include_directoris for other targets dependent on core-utils
This commit is contained in:
Geert Janssens
2019-10-02 12:31:44 +02:00
parent 36c19b4085
commit ad8c388235
3 changed files with 18 additions and 18 deletions

View File

@@ -22,23 +22,20 @@ add_dependencies(gnucash-guile
swig-runtime-h)
target_include_directories(gnucash-guile
PRIVATE
${CMAKE_SOURCE_DIR}/common
${CMAKE_BINARY_DIR}/common
${CMAKE_SOURCE_DIR}/libgnucash/core-utils
${CMAKE_BINARY_DIR}/libgnucash/core-utils # For gnc-version-info.h
${GLIB2_INCLUDE_DIRS}
${GTK_MAC_INCLUDE_DIRS}
PUBLIC
${CMAKE_CURRENT_SOURCE_DIR}
${GUILE_INCLUDE_DIRS})
${GUILE_INCLUDE_DIRS}
${GLIB2_INCLUDE_DIRS}
PRIVATE
${CMAKE_SOURCE_DIR}/common
${CMAKE_BINARY_DIR}/common)
target_link_libraries(gnucash-guile
gnc-core-utils
${GUILE_LDFLAGS}
${GLIB2_LDFLAGS}
${GOBJECT_LDFLAGS}
${GTK_MAC_LDFLAGS})
PUBLIC
${GUILE_LDFLAGS}
PRIVATE
gnc-core-utils
${GLIB2_LDFLAGS})
install(TARGETS gnucash-guile
LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}

View File

@@ -146,6 +146,7 @@ target_link_libraries(gnc-gnome
gncmod-gnome-utils
gncmod-engine
gnucash-guile
${Boost_LIBRARIES}
PkgConfig::GTK3
${GTK_MAC_LDFLAGS})

View File

@@ -47,14 +47,16 @@ target_include_directories(gnc-core-utils
${CMAKE_CURRENT_BINARY_DIR}
${CMAKE_CURRENT_SOURCE_DIR}
${GLIB2_INCLUDE_DIRS}
PRIVATE
${GTK_MAC_INCLUDE_DIRS})
target_link_libraries(gnc-core-utils
${Boost_LIBRARIES}
${GLIB2_LDFLAGS}
${GOBJECT_LDFLAGS}
${GTK_MAC_LDFLAGS}
"$<$<BOOL:${MAC_INTEGRATION}>:${OSX_EXTRA_LIBRARIES}>")
PRIVATE
${Boost_LIBRARIES}
${GLIB2_LDFLAGS}
${GOBJECT_LDFLAGS}
${GTK_MAC_LDFLAGS}
"$<$<BOOL:${MAC_INTEGRATION}>:${OSX_EXTRA_LIBRARIES}>")
target_compile_definitions(gnc-core-utils
PRIVATE