mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 20:02:44 +00:00 
			
		
		
		
	 350fdf1e43
			
		
	
	
		350fdf1e43
		
	
	
	
	
		
			
			LibCore currently cannot depend on LibTimeZone directly. All build-time code generators depend on LibCore, so there'd be a circular dependency: LibCore -> LibTimeZone -> GenerateTZData -> LibCore. So to support parsing time zone names and applying their offsets, add a couple of weakly-defined helper functions. These work similar to the way AK::String declares some methods that LibUnicode defines. Any user who wants to parse time zone names (from outside of LibCore itself) can link against LibTimeZone to receive full support.
		
			
				
	
	
		
			19 lines
		
	
	
	
		
			732 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
	
		
			732 B
		
	
	
	
		
			CMake
		
	
	
	
	
	
| include(${SerenityOS_SOURCE_DIR}/Meta/CMake/time_zone_data.cmake)
 | |
| 
 | |
| set(SOURCES
 | |
|     ${TIME_ZONE_DATA_SOURCES}
 | |
|     DateTime.cpp
 | |
|     TimeZone.cpp
 | |
| )
 | |
| set(GENERATED_SOURCES ${CURRENT_LIB_GENERATED})
 | |
| 
 | |
| add_library(LibTimeZone OBJECT ${SOURCES})
 | |
| serenity_generated_sources(LibTimeZone)
 | |
| target_compile_definitions(LibTimeZone PRIVATE ENABLE_TIME_ZONE_DATA=$<BOOL:${ENABLE_TIME_ZONE_DATABASE_DOWNLOAD}>)
 | |
| 
 | |
| # NOTE: These objects are used by the DynamicLoader, which is always built without coverage instrumentation.
 | |
| #       We could allow them to be instrumented for coverage if DynamicLoader built its own copy
 | |
| target_link_libraries(LibTimeZone PRIVATE NoCoverage)
 | |
| if (SERENITYOS)
 | |
|     add_dependencies(LibTimeZone install_libc_headers)
 | |
| endif()
 |