Skip to content

Instantly share code, notes, and snippets.

@meshula
Last active January 8, 2019 01:08
Show Gist options
  • Save meshula/0f95a170e532a5fe7f56a72becca4aec to your computer and use it in GitHub Desktop.
Save meshula/0f95a170e532a5fe7f56a72becca4aec to your computer and use it in GitHub Desktop.
cmake namespaced import libraries
# iOS tool chain. there is an android one as well
# https://github.com/SFML/SFML/blob/master/cmake/toolchains/iOS.toolchain.cmake
if(FANCY_FOUND)
add_library(Fancy::Base STATIC IMPORTED)
set_target_properties(Fancy::Base PROPERTIES IMPORTED_CONFIGURATIONS "Debug;Release")
set_target_properties(Fancy::Base PROPERTIES IMPORTED_LOCATION_RELEASE ${Fancy_LIBRARIES})
set_target_properties(Fancy::Base PROPERTIES IMPORTED_LOCATION_DEBUG ${Fancy_DEBUG_LIBRARIES})
set_target_properties(Fancy::Base PROPERTIES MAP_IMPORTED_CONFIG_RELWITHDEBINFO RELEASE)
set_property(TARGET Fancy::Base APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES ${Fancy_INCLUDE_DIR})
endif()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment