aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorLi Jin <dragon-fly@qq.com>2021-03-08 22:05:01 +0800
committerLi Jin <dragon-fly@qq.com>2021-03-08 22:05:01 +0800
commite4f55032f27c0085c041c67a55af7ceec6d776f5 (patch)
treefbc1c96e64d076e8812af52d5310edf9a6eb9e9c /CMakeLists.txt
parent8acb48264d3ae87e5cdae2fea4207be22cf08a97 (diff)
downloadyuescript-e4f55032f27c0085c041c67a55af7ceec6d776f5.tar.gz
yuescript-e4f55032f27c0085c041c67a55af7ceec6d776f5.tar.bz2
yuescript-e4f55032f27c0085c041c67a55af7ceec6d776f5.zip
fix CMakelist.txt.
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt7
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 "")
36set_target_properties(libyue PROPERTIES OUTPUT_NAME "yue") 36set_target_properties(libyue PROPERTIES OUTPUT_NAME "yue")
37target_link_libraries(libyue ${LUA_LIBRARIES}) 37target_link_libraries(libyue ${LUA_LIBRARIES})
38 38
39find_package(Threads REQUIRED)
39add_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) 40add_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)
40target_link_libraries(yue ${LUA_LIBRARIES}) 41target_link_libraries(yue ${LUA_LIBRARIES} Threads::Threads)
41target_link_options(yue PRIVATE -ldl -lpthread) 42if(CMAKE_DL_LIBS)
43 target_link_libraries(yue ${CMAKE_DL_LIBS})
44endif()
42if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") 45if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
43 target_link_options(yue PRIVATE -lstdc++fs) 46 target_link_options(yue PRIVATE -lstdc++fs)
44endif() 47endif()