Skip to content

Commit 9d2d5fa

Browse files
committed
build: avoid duplicating all the flags for FreeBSD
This simplifies the build logic and properly adds the linker search path to the build when building for FreeBSD.
1 parent 86810fe commit 9d2d5fa

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

CMakeLists.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,9 @@ find_package(Foundation QUIET)
5353
find_package(SQLite3 REQUIRED)
5454

5555
# Enable `package` modifier for the whole package.
56+
add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:-package-name;SwiftPM>")
5657
if(CMAKE_SYSTEM_NAME STREQUAL FreeBSD)
57-
add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:-package-name;SwiftPM>" -L/usr/local/lib)
58-
else()
59-
add_compile_options("$<$<COMPILE_LANGUAGE:Swift>:-package-name;SwiftPM>")
58+
link_directories(/usr/local/lib)
6059
endif()
6160

6261
add_subdirectory(BuildSupport/SwiftSyntax)

0 commit comments

Comments
 (0)