Streamline bugsplat target:
- Fix usage of bugsplat::bugsplat by using ll::bugsplat - Use bugsplat define by importing target not by using hand crafted magicmeow-7.2.2
parent
2c3507a9d2
commit
3ac18ad993
|
|
@ -16,20 +16,22 @@ if (USE_BUGSPLAT)
|
|||
include(Prebuilt)
|
||||
use_prebuilt_binary(bugsplat)
|
||||
if (WINDOWS)
|
||||
set_target_libraries( bugsplat::bugsplat
|
||||
set_target_libraries( ll::bugsplat
|
||||
${ARCH_PREBUILT_DIRS_RELEASE}/bugsplat.lib
|
||||
)
|
||||
elseif (DARWIN)
|
||||
find_library(BUGSPLAT_LIBRARIES BugsplatMac REQUIRED
|
||||
NO_DEFAULT_PATH PATHS "${ARCH_PREBUILT_DIRS_RELEASE}")
|
||||
set_target_libraries( bugsplat::bugsplat
|
||||
set_target_libraries( ll::bugsplat
|
||||
${BUGSPLAT_LIBRARIES}
|
||||
)
|
||||
else (WINDOWS)
|
||||
message(FATAL_ERROR "BugSplat is not supported; add -DUSE_BUGSPLAT=OFF")
|
||||
endif (WINDOWS)
|
||||
|
||||
set(BUGSPLAT_DB "" CACHE STRING "BugSplat crash database name")
|
||||
if( NOT BUGSPLAT_DB )
|
||||
message( FATAL_ERROR "You need to set BUGSPLAT_DB when setting USE_BUGSPLAT" )
|
||||
endif()
|
||||
|
||||
set_target_include_dirs( ll::bugsplat ${LIBS_PREBUILT_DIR}/include/bugsplat)
|
||||
set_property( TARGET ll::bugsplat APPEND PROPERTY INTERFACE_COMPILE_DEFINITIONS LL_BUGSPLAT)
|
||||
|
|
|
|||
|
|
@ -247,11 +247,6 @@ set(llcommon_HEADER_FILES
|
|||
set_source_files_properties(${llcommon_HEADER_FILES}
|
||||
PROPERTIES HEADER_FILE_ONLY TRUE)
|
||||
|
||||
if (USE_BUGSPLAT)
|
||||
set_source_files_properties(${llcommon_SOURCE_FILES}
|
||||
PROPERTIES COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}")
|
||||
endif (USE_BUGSPLAT)
|
||||
|
||||
list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES})
|
||||
|
||||
if(LLCOMMON_LINK_SHARED)
|
||||
|
|
@ -275,6 +270,7 @@ endif(LLCOMMON_LINK_SHARED)
|
|||
target_link_libraries(
|
||||
llcommon
|
||||
ll::apr
|
||||
ll::bugsplat
|
||||
ll::expat
|
||||
ll::jsoncpp
|
||||
ll::zlib-ng
|
||||
|
|
|
|||
|
|
@ -60,10 +60,6 @@ list(APPEND test_SOURCE_FILES ${test_HEADER_FILES})
|
|||
|
||||
add_executable(lltest ${test_SOURCE_FILES})
|
||||
|
||||
if (USE_BUGSPLAT)
|
||||
set_target_properties(lltest PROPERTIES COMPILE_DEFINITIONS "${BUGSPLAT_DEFINE}")
|
||||
endif (USE_BUGSPLAT)
|
||||
|
||||
target_link_libraries(lltest
|
||||
llinventory
|
||||
llmessage
|
||||
|
|
|
|||
Loading…
Reference in New Issue