summaryrefslogtreecommitdiff
path: root/indra/llcommon/CMakeLists.txt
diff options
context:
space:
mode:
authorCallum Prentice <callum@lindenlab.com>2023-04-03 14:58:58 -0700
committerCallum Prentice <callum@lindenlab.com>2023-04-03 14:58:58 -0700
commit28b240fd7fc39ff4668e37b5aa3bdfe392415b34 (patch)
tree923892b5ea9e9ac4d757fba089f0e9b2b24fbf26 /indra/llcommon/CMakeLists.txt
parent7b9866791ac7922f7527811bbc99c090f35e4cfd (diff)
parentc7053a6928fd5eafdc935453742e92951ae4e0c1 (diff)
DRTVWR-489: Fix things up after a messy merge with main because of a gigantic CMake patch. Sadly, my macOS box updated to Xcode14.3 overnight and that caused many warnings/errors with variables being initialized and then used but not in a way that affected anything.. Building on Xcode 14.3 also requires that MACOSX_DEPLOYMENT_TARGET be set to > 10.13. Waiting on a decision about that but checking this in in the meantime. Builds on macOS with appropriate build variables set for MACOSX_DEPLOYMENT_TARGET = 10.14 but not really expecting this to build in TC because (REDACTED). Windows version probably hopelessly broken - switching to that now.
Diffstat (limited to 'indra/llcommon/CMakeLists.txt')
-rw-r--r--indra/llcommon/CMakeLists.txt77
1 files changed, 15 insertions, 62 deletions
diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt
index 3371306f11..620b2c636c 100644
--- a/indra/llcommon/CMakeLists.txt
+++ b/indra/llcommon/CMakeLists.txt
@@ -15,19 +15,6 @@ include(ZLIBNG)
include(URIPARSER)
include(Tracy)
-include_directories(
- ${EXPAT_INCLUDE_DIRS}
- ${LLCOMMON_INCLUDE_DIRS}
- ${JSONCPP_INCLUDE_DIR}
- ${ZLIBNG_INCLUDE_DIRS}
- ${URIPARSER_INCLUDE_DIRS}
- ${TRACY_INCLUDE_DIR}
- )
-
-# add_executable(lltreeiterators lltreeiterators.cpp)
-#
-# target_link_libraries(lltreeiterators
-# ${LLCOMMON_LIBRARIES})
set(llcommon_SOURCE_FILES
indra_constants.cpp
@@ -272,53 +259,26 @@ if (DARWIN)
list(APPEND llcommon_SOURCE_FILES llsys_objc.mm)
endif (DARWIN)
-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)
- add_library (llcommon SHARED ${llcommon_SOURCE_FILES})
- if(NOT ADDRESS_SIZE EQUAL 32)
- if(WINDOWS)
- ##add_definitions(/FIXED:NO)
- else(WINDOWS) # not windows therefore gcc LINUX and DARWIN
- add_definitions(-fPIC)
- endif(WINDOWS)
- endif(NOT ADDRESS_SIZE EQUAL 32)
- if(WINDOWS)
- # always generate llcommon.pdb, even for "Release" builds
- set_target_properties(llcommon PROPERTIES LINK_FLAGS "/DEBUG")
- endif(WINDOWS)
- ll_stage_sharedlib(llcommon)
-else(LLCOMMON_LINK_SHARED)
- add_library (llcommon ${llcommon_SOURCE_FILES})
-endif(LLCOMMON_LINK_SHARED)
+add_library (llcommon ${llcommon_SOURCE_FILES})
target_link_libraries(
- llcommon
- ${APRUTIL_LIBRARIES}
- ${APR_LIBRARIES}
- ${EXPAT_LIBRARIES}
- ${ICU4C_LIBRARY}
- ${JSONCPP_LIBRARIES}
- ${ZLIBNG_LIBRARIES}
- ${WINDOWS_LIBRARIES}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_PROGRAM_OPTIONS_LIBRARY}
- ${BOOST_REGEX_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY}
- ${GOOGLE_PERFTOOLS_LIBRARIES}
- ${URIPARSER_LIBRARIES}
- ${TRACY_LIBRARY}
+ llcommon
+ ${ICU4C_LIBRARY}
+ ll::apr
+ ll::expat
+ ll::jsoncpp
+ ll::zlib-ng
+ ll::boost
+ ll::uriparser
+ ll::oslibraries
+ ll::tracy
)
+target_include_directories(llcommon INTERFACE ${CMAKE_CURRENT_SOURCE_DIR})
+target_include_directories(llcommon PRIVATE ${CMAKE_CURRENT_SOURCE_DIR})
+
add_dependencies(llcommon stage_third_party_libs)
if (LL_TESTS)
@@ -329,14 +289,7 @@ if (LL_TESTS)
LL_ADD_PROJECT_UNIT_TESTS(llcommon "${llcommon_TEST_SOURCE_FILES}")
#set(TEST_DEBUG on)
- set(test_libs llcommon
- ${LLCOMMON_LIBRARIES}
- ${WINDOWS_LIBRARIES}
- ${GOOGLEMOCK_LIBRARIES}
- ${BOOST_FIBER_LIBRARY}
- ${BOOST_CONTEXT_LIBRARY}
- ${BOOST_THREAD_LIBRARY}
- ${BOOST_SYSTEM_LIBRARY})
+ set(test_libs llcommon)
LL_ADD_INTEGRATION_TEST(bitpack "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(classic_callback "" "${test_libs}")
LL_ADD_INTEGRATION_TEST(commonmisc "" "${test_libs}")