cmake: Move TARGETS_EXPORT_NAME to top

This commit is contained in:
Mark Mossberg
2019-12-03 22:35:33 +00:00
parent 588c6577dd
commit 60e96163ca

View File

@@ -48,6 +48,8 @@ set(CMAKE_VISIBILITY_INLINES_HIDDEN 1)
# to distinguish between debug and release lib # to distinguish between debug and release lib
set(CMAKE_DEBUG_POSTFIX "d") set(CMAKE_DEBUG_POSTFIX "d")
set(TARGETS_EXPORT_NAME "${CMAKE_PROJECT_NAME}Targets")
add_library(tinyxml2 tinyxml2.cpp tinyxml2.h) add_library(tinyxml2 tinyxml2.cpp tinyxml2.h)
set_target_properties(tinyxml2 PROPERTIES set_target_properties(tinyxml2 PROPERTIES
@@ -73,8 +75,6 @@ else()
endif(MSVC) endif(MSVC)
endif() endif()
set(TARGETS_EXPORT_NAME "${CMAKE_PROJECT_NAME}Targets")
# Export cmake script that can be used by downstream project # Export cmake script that can be used by downstream project
# via `include()` # via `include()`
export(TARGETS tinyxml2 export(TARGETS tinyxml2