diff options
author | Nicky <nicky.dasmijn@gmail.com> | 2022-04-06 16:32:52 +0200 |
---|---|---|
committer | Nicky <nicky.dasmijn@gmail.com> | 2022-04-06 16:32:52 +0200 |
commit | 786b291d9c6b784c7ce6ceef0e38a4ec76ea14db (patch) | |
tree | ed7386562337f06b212e0e95753c891ec7efbb3a /indra/cmake/EXPAT.cmake | |
parent | 7522cea2528f9cfdf5283a7920dd3434417b20f4 (diff) |
Move CMake files to modernized cmake syntax, step 1.
Change projects to cmake targetsto get rid of havig to hardcore
include directories and link libraries in consumer projects.
Diffstat (limited to 'indra/cmake/EXPAT.cmake')
-rw-r--r-- | indra/cmake/EXPAT.cmake | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/indra/cmake/EXPAT.cmake b/indra/cmake/EXPAT.cmake index cddc71b227..6f6503ca4d 100644 --- a/indra/cmake/EXPAT.cmake +++ b/indra/cmake/EXPAT.cmake @@ -1,23 +1,25 @@ # -*- cmake -*- include(Prebuilt) -set(EXPAT_FIND_QUIETLY ON) -set(EXPAT_FIND_REQUIRED ON) +if( TARGET expat::expat ) + return() +endif() +create_target( expat::expat INTERFACE IMPORTED ) if (USESYSTEMLIBS) include(FindEXPAT) else (USESYSTEMLIBS) use_prebuilt_binary(expat) if (WINDOWS) - set(EXPAT_LIBRARIES libexpatMT) + set_target_libraries( expat::expat libexpatMT ) set(EXPAT_COPY libexpatMT.dll) else (WINDOWS) - set(EXPAT_LIBRARIES expat) + set_target_libraries( expat::expat expat ) if (DARWIN) set(EXPAT_COPY libexpat.1.dylib libexpat.dylib) else () set(EXPAT_COPY libexpat.so.1 libexpat.so) endif () endif (WINDOWS) - set(EXPAT_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include) + set_target_include_dirs( expat::expat ${LIBS_PREBUILT_DIR}/include ) endif (USESYSTEMLIBS) |