cmake: specify dependencies to guarantee linking order

This commit is contained in:
Lephenixnoir 2021-02-04 21:56:15 +01:00
parent 65c79fc143
commit 0ee2016d1f
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 5 additions and 1 deletions

View File

@ -1,3 +1,5 @@
find_package(Gint 2.1 REQUIRED)
# Find libexample.a; if we had platform-specific versions we could look for
# libexample-${FXSDK_PLATFORM}.a instead.
execute_process(
@ -47,5 +49,7 @@ if(LibExample_FOUND)
# and relink any user application when the library is updated!
IMPORTED_LOCATION "${EX_PATH}"
# Linking options
INTERFACE_LINK_OPTIONS -lexample)
INTERFACE_LINK_OPTIONS -lexample
# Dependencies (for order on the command-line)
IMPORTED_LINK_INTERFACE_LIBRARIES Gint::Gint)
endif()