diff options
author | Li Jin <dragon-fly@qq.com> | 2023-08-11 11:16:16 +0800 |
---|---|---|
committer | Li Jin <dragon-fly@qq.com> | 2023-08-11 11:16:16 +0800 |
commit | 289faf45ac26f7e0ac1a1e4305e5c42fc1e5b866 (patch) | |
tree | 0e4d813ea7013723be2638fdee9bb2a3fb8b7355 /CMakeLists.txt | |
parent | 949166b7db8ff195ce6f1d8d1fa34c242d267af1 (diff) | |
download | yuescript-289faf45ac26f7e0ac1a1e4305e5c42fc1e5b866.tar.gz yuescript-289faf45ac26f7e0ac1a1e4305e5c42fc1e5b866.tar.bz2 yuescript-289faf45ac26f7e0ac1a1e4305e5c42fc1e5b866.zip |
fix build.
Diffstat (limited to '')
-rw-r--r-- | CMakeLists.txt | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 402e5c9..22520de 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -160,10 +160,6 @@ elseif (${CMAKE_BUILD_TYPE} MATCHES "Release") | |||
160 | target_compile_definitions(yue PRIVATE NDEBUG) | 160 | target_compile_definitions(yue PRIVATE NDEBUG) |
161 | endif() | 161 | endif() |
162 | 162 | ||
163 | if (CMAKE_DL_LIBS) | ||
164 | target_link_options(yue PRIVATE -ldl) | ||
165 | endif() | ||
166 | |||
167 | find_package(Threads REQUIRED) | 163 | find_package(Threads REQUIRED) |
168 | if (APPLE) | 164 | if (APPLE) |
169 | set(MAC_LIBS "-framework CoreFoundation" "-framework CoreServices") | 165 | set(MAC_LIBS "-framework CoreFoundation" "-framework CoreServices") |
@@ -175,7 +171,7 @@ else () | |||
175 | endif() | 171 | endif() |
176 | 172 | ||
177 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | 173 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") |
178 | target_link_options(yue PRIVATE -lstdc++fs) | 174 | target_link_options(yue PRIVATE -lstdc++fs -ldl) |
179 | endif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | 175 | endif (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") |
180 | 176 | ||
181 | install(CODE "") | 177 | install(CODE "") |