summaryrefslogtreecommitdiff
path: root/indra/cmake/LLPrimitive.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'indra/cmake/LLPrimitive.cmake')
-rw-r--r--indra/cmake/LLPrimitive.cmake31
1 files changed, 15 insertions, 16 deletions
diff --git a/indra/cmake/LLPrimitive.cmake b/indra/cmake/LLPrimitive.cmake
index 1e77ec3346..03a5d165b3 100644
--- a/indra/cmake/LLPrimitive.cmake
+++ b/indra/cmake/LLPrimitive.cmake
@@ -2,11 +2,11 @@
# these should be moved to their own cmake file
include(Prebuilt)
+include(Linking)
include(Boost)
include_guard()
-add_library( ll::pcre INTERFACE IMPORTED )
add_library( ll::minizip-ng INTERFACE IMPORTED )
add_library( ll::libxml INTERFACE IMPORTED )
add_library( ll::colladadom INTERFACE IMPORTED )
@@ -24,6 +24,12 @@ if( USESYSTEMLIBS )
# indra/llprimitive/CMakeLists.txt
return ()
endif( LINUX OR CMAKE_SYSTEM_NAME MATCHES FreeBSD)
+ include(FindPkgConfig)
+ pkg_check_modules(Minizip REQUIRED minizip)
+ pkg_check_modules(Libxml2 REQUIRED libxml-2.0)
+ pkg_check_modules(Libpcrecpp libpcrecpp)
+ target_link_libraries( ll::minizip-ng INTERFACE ${Minizip_LIBRARIES} )
+ target_link_libraries( ll::libxml INTERFACE ${Libxml2_LIBRARIES} )
if ( ${PREBUILD_TRACKING_DIR}/sentinel_installed IS_NEWER_THAN ${PREBUILD_TRACKING_DIR}/colladadom_installed OR NOT ${colladadom_installed} EQUAL 0 )
if (NOT EXISTS ${CMAKE_BINARY_DIR}/3p-colladadom-2.3-r4.tar.gz)
file(DOWNLOAD
@@ -36,10 +42,6 @@ if( USESYSTEMLIBS )
DESTINATION ${CMAKE_BINARY_DIR}
)
file(MAKE_DIRECTORY ${LIBS_PREBUILT_DIR}/include/collada/1.4)
- include(FindPkgConfig)
- pkg_check_modules(Minizip REQUIRED minizip)
- pkg_check_modules(Libxml2 REQUIRED libxml-2.0)
- pkg_check_modules(Libpcrecpp libpcrecpp)
if( DARWIN )
try_compile(COLLADADOM_RESULT
PROJECT colladadom
@@ -127,32 +129,29 @@ use_system_binary( colladadom )
use_prebuilt_binary(colladadom)
use_prebuilt_binary(minizip-ng) # needed for colladadom
-use_prebuilt_binary(pcre)
use_prebuilt_binary(libxml2)
-endif( USESYSTEMLIBS )
-
-target_link_libraries( ll::pcre INTERFACE pcrecpp pcre )
if (WINDOWS)
- target_link_libraries( ll::minizip-ng INTERFACE libminizip )
+ target_link_libraries( ll::minizip-ng INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/minizip.lib )
else()
- target_link_libraries( ll::minizip-ng INTERFACE minizip )
+ target_link_libraries( ll::minizip-ng INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libminizip.a )
endif()
if (WINDOWS)
- target_link_libraries( ll::libxml INTERFACE libxml2_a)
+ target_link_libraries( ll::libxml INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libxml2.lib Bcrypt.lib)
else()
- target_link_libraries( ll::libxml INTERFACE xml2)
+ target_link_libraries( ll::libxml INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libxml2.a)
endif()
+endif( USESYSTEMLIBS )
target_include_directories( ll::colladadom SYSTEM INTERFACE
${LIBS_PREBUILT_DIR}/include/collada
${LIBS_PREBUILT_DIR}/include/collada/1.4
)
if (WINDOWS)
- target_link_libraries(ll::colladadom INTERFACE libcollada14dom23-s ll::libxml ll::minizip-ng )
+ target_link_libraries(ll::colladadom INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libcollada14dom23-s.lib ll::libxml ll::minizip-ng )
elseif (DARWIN)
- target_link_libraries(ll::colladadom INTERFACE collada14dom ll::libxml ll::minizip-ng)
+ target_link_libraries(ll::colladadom INTERFACE collada14dom ll::boost ll::libxml ll::minizip-ng)
else ()
- target_link_libraries(ll::colladadom INTERFACE collada14dom ll::libxml ll::minizip-ng)
+ target_link_libraries(ll::colladadom INTERFACE collada14dom ll::boost ll::libxml ll::minizip-ng ${Libpcrecpp_LIBRARIES})
endif()