@@ -28,19 +28,21 @@ if(WIN32)
28
28
target_link_libraries (SwiftInspectClient PRIVATE
29
29
SwiftInspectClientInterface )
30
30
elseif (LINUX )
31
- string (APPEND CMAKE_Swift_FLAGS " -Xcc -D_GNU_SOURCE" )
31
+ add_library (LinuxSystemHeaders INTERFACE )
32
+ target_include_directories (LinuxSystemHeaders INTERFACE
33
+ Sources /SwiftInspectLinux/SystemHeaders )
34
+
32
35
add_library (SwiftInspectLinux STATIC
33
36
Sources /SwiftInspectLinux/ElfFile.swift
34
37
Sources /SwiftInspectLinux/LinkMap.swift
35
38
Sources /SwiftInspectLinux/MemoryMap.swift
36
39
Sources /SwiftInspectLinux/Process.swift
37
40
Sources /SwiftInspectLinux/ProcFS.swift
38
41
Sources /SwiftInspectLinux/SymbolCache.swift )
39
- target_link_libraries (SwiftInspectLinux PRIVATE
42
+ target_compile_options (SwiftInspectLinux PRIVATE
43
+ -Xcc -D_GNU_SOURCE )
44
+ target_link_libraries (SwiftInspectLinux PUBLIC
40
45
LinuxSystemHeaders )
41
- add_library (LinuxSystemHeaders INTERFACE )
42
- target_include_directories (LinuxSystemHeaders INTERFACE
43
- Sources /SwiftInspectLinux/SystemHeaders )
44
46
endif ()
45
47
46
48
add_executable (swift-inspect
@@ -72,8 +74,6 @@ if(WIN32)
72
74
elseif (LINUX )
73
75
target_link_libraries (swift-inspect PRIVATE
74
76
SwiftInspectLinux )
75
- target_link_libraries (swift-inspect PRIVATE
76
- LinuxSystemHeaders )
77
77
endif ()
78
78
79
79
install (TARGETS swift-inspect
0 commit comments