mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 05:52:46 +00:00 
			
		
		
		
	 b9dc2d7ebf
			
		
	
	
		b9dc2d7ebf
		
	
	
	
	
		
			
			Core::System already had some wrappers for *env() functions, which I've copied over. But 1) the set of functions there was incomplete, and 2) the environment feels like an object in its own right, so let's treat it as one. :^) Also add `Core::Environment::has(StringView)` for situations where we just care if a variable is defined.
		
			
				
	
	
		
			75 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
			
		
		
	
	
			75 lines
		
	
	
	
		
			1.8 KiB
		
	
	
	
		
			CMake
		
	
	
	
	
	
| set(SOURCES
 | |
|     AnonymousBuffer.cpp
 | |
|     ArgsParser.cpp
 | |
|     Command.cpp
 | |
|     ConfigFile.cpp
 | |
|     DateTime.cpp
 | |
|     Directory.cpp
 | |
|     DirectoryEntry.cpp
 | |
|     DirIterator.cpp
 | |
|     ElapsedTimer.cpp
 | |
|     Environment.cpp
 | |
|     Event.cpp
 | |
|     EventLoop.cpp
 | |
|     EventLoopImplementation.cpp
 | |
|     EventLoopImplementationUnix.cpp
 | |
|     EventReceiver.cpp
 | |
|     File.cpp
 | |
|     LockFile.cpp
 | |
|     MappedFile.cpp
 | |
|     MimeData.cpp
 | |
|     NetworkJob.cpp
 | |
|     Notifier.cpp
 | |
|     Process.cpp
 | |
|     ProcessStatisticsReader.cpp
 | |
|     Resource.cpp
 | |
|     ResourceImplementation.cpp
 | |
|     ResourceImplementationFile.cpp
 | |
|     SecretString.cpp
 | |
|     SessionManagement.cpp
 | |
|     Socket.cpp
 | |
|     SOCKSProxyClient.cpp
 | |
|     StandardPaths.cpp
 | |
|     System.cpp
 | |
|     SystemServerTakeover.cpp
 | |
|     TCPServer.cpp
 | |
|     ThreadEventQueue.cpp
 | |
|     Timer.cpp
 | |
|     UDPServer.cpp
 | |
|     Version.cpp
 | |
| )
 | |
| if (NOT ANDROID AND NOT WIN32 AND NOT EMSCRIPTEN)
 | |
|     list(APPEND SOURCES
 | |
|         Account.cpp
 | |
|         FilePermissionsMask.cpp
 | |
|         GetPassword.cpp
 | |
|         Group.cpp
 | |
|     )
 | |
| endif()
 | |
| if (NOT WIN32 AND NOT EMSCRIPTEN)
 | |
|     list(APPEND SOURCES LocalServer.cpp)
 | |
| endif()
 | |
| 
 | |
| # FIXME: Implement Core::FileWatcher for macOS, *BSD, and Windows.
 | |
| if (SERENITYOS)
 | |
|     list(APPEND SOURCES FileWatcherSerenity.cpp)
 | |
| elseif (LINUX AND NOT EMSCRIPTEN)
 | |
|     list(APPEND SOURCES FileWatcherLinux.cpp)
 | |
| elseif (APPLE)
 | |
|     list(APPEND SOURCES FileWatcherMacOS.mm)
 | |
| else()
 | |
|     list(APPEND SOURCES FileWatcherUnimplemented.cpp)
 | |
| endif()
 | |
| 
 | |
| serenity_lib(LibCore core)
 | |
| target_link_libraries(LibCore PRIVATE LibCrypt LibSystem)
 | |
| 
 | |
| if (APPLE)
 | |
|     target_link_libraries(LibCore PUBLIC "-framework CoreFoundation")
 | |
|     target_link_libraries(LibCore PUBLIC "-framework CoreServices")
 | |
|     target_link_libraries(LibCore PUBLIC "-framework Foundation")
 | |
| endif()
 | |
| 
 | |
| if (ANDROID)
 | |
|     target_link_libraries(LibCore PRIVATE log)
 | |
| endif()
 |