diff options
| author | Li Jin <dragon-fly@qq.com> | 2021-03-08 22:05:01 +0800 |
|---|---|---|
| committer | Li Jin <dragon-fly@qq.com> | 2021-03-08 22:05:01 +0800 |
| commit | e4f55032f27c0085c041c67a55af7ceec6d776f5 (patch) | |
| tree | fbc1c96e64d076e8812af52d5310edf9a6eb9e9c | |
| parent | 8acb48264d3ae87e5cdae2fea4207be22cf08a97 (diff) | |
| download | yuescript-e4f55032f27c0085c041c67a55af7ceec6d776f5.tar.gz yuescript-e4f55032f27c0085c041c67a55af7ceec6d776f5.tar.bz2 yuescript-e4f55032f27c0085c041c67a55af7ceec6d776f5.zip | |
fix CMakelist.txt.
Diffstat (limited to '')
| -rw-r--r-- | CMakeLists.txt | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 55bcd7d..d3ca6fd 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
| @@ -36,9 +36,12 @@ set_target_properties(libyue PROPERTIES PREFIX "") | |||
| 36 | set_target_properties(libyue PROPERTIES OUTPUT_NAME "yue") | 36 | set_target_properties(libyue PROPERTIES OUTPUT_NAME "yue") |
| 37 | target_link_libraries(libyue ${LUA_LIBRARIES}) | 37 | target_link_libraries(libyue ${LUA_LIBRARIES}) |
| 38 | 38 | ||
| 39 | find_package(Threads REQUIRED) | ||
| 39 | add_executable(yue src/yuescript/ast.cpp src/yuescript/yue_compiler.cpp src/yuescript/yue_parser.cpp src/yuescript/yuescript.cpp src/yuescript/parser.cpp src/yue.cpp) | 40 | add_executable(yue src/yuescript/ast.cpp src/yuescript/yue_compiler.cpp src/yuescript/yue_parser.cpp src/yuescript/yuescript.cpp src/yuescript/parser.cpp src/yue.cpp) |
| 40 | target_link_libraries(yue ${LUA_LIBRARIES}) | 41 | target_link_libraries(yue ${LUA_LIBRARIES} Threads::Threads) |
| 41 | target_link_options(yue PRIVATE -ldl -lpthread) | 42 | if(CMAKE_DL_LIBS) |
| 43 | target_link_libraries(yue ${CMAKE_DL_LIBS}) | ||
| 44 | endif() | ||
| 42 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | 45 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") |
| 43 | target_link_options(yue PRIVATE -lstdc++fs) | 46 | target_link_options(yue PRIVATE -lstdc++fs) |
| 44 | endif() | 47 | endif() |
