Skip to content

Commit

Permalink
Fix interface-query lib linking.
Browse files Browse the repository at this point in the history
  • Loading branch information
Themaister committed Oct 21, 2023
1 parent 7fb75fd commit 6b90d5c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
19 changes: 9 additions & 10 deletions application/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,27 +30,26 @@ if (TARGET granite-renderer)
PRIVATE granite-rapidjson)
endif()

# Can be defined by application to get a custom entry point.
# Otherwise, get a default one.
if (NOT TARGET granite-application-interface-query)
add_granite_internal_lib(granite-application-interface-query STATIC application_interface_query.cpp)
target_compile_options(granite-application-interface-query PRIVATE ${GRANITE_CXX_FLAGS})
endif()

if (NOT ANDROID)
add_granite_internal_lib(granite-application-entry STATIC application_entry.cpp)
target_compile_options(granite-application-entry PRIVATE ${GRANITE_CXX_FLAGS})
target_link_libraries(granite-application-entry
PRIVATE granite-application granite-platform granite-filesystem)
PRIVATE granite-application-interface-query granite-application granite-platform granite-filesystem)
endif()

add_library(granite-application-entry-headless STATIC application_entry.cpp)
target_compile_definitions(granite-application-entry-headless PRIVATE APPLICATION_ENTRY_HEADLESS=1)
target_link_libraries(granite-application-entry-headless
PRIVATE granite-application granite-platform granite-filesystem)
PRIVATE granite-application-interface-query granite-application granite-platform granite-filesystem)
target_compile_options(granite-application-entry-headless PRIVATE ${GRANITE_CXX_FLAGS})

# Can be defined by application to get a custom entry point.
# Otherwise, get a default one.
if (NOT TARGET granite-application-interface-query)
add_granite_internal_lib(granite-application-interface-query STATIC application_interface_query.cpp)
target_compile_options(granite-application-interface-query PRIVATE ${GRANITE_CXX_FLAGS})
endif()
target_link_libraries(granite-application PRIVATE granite-application-interface-query)

add_subdirectory(events)
add_subdirectory(input)
add_subdirectory(platforms)
Expand Down
2 changes: 1 addition & 1 deletion application/platforms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ else()
message(FATAL "GRANITE_PLATFORM is not set.")
endif()

target_link_libraries(granite-platform PRIVATE granite-application granite-input granite-application-global-init)
target_link_libraries(granite-platform PRIVATE granite-application-interface-query granite-application granite-input granite-application-global-init)

if (GRANITE_AUDIO)
target_link_libraries(granite-platform PRIVATE granite-audio)
Expand Down

0 comments on commit 6b90d5c

Please sign in to comment.