diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7374e1c..1fcb248 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt | |||
@@ -26,7 +26,7 @@ MESSAGE(STATUS "Lua library: ${LUA_LIBRARIES}") | |||
26 | 26 | ||
27 | enable_language( CXX ) | 27 | enable_language( CXX ) |
28 | include_directories( src ${LUA_INCLUDE_DIR} ) | 28 | include_directories( src ${LUA_INCLUDE_DIR} ) |
29 | add_definitions( -std=c++17 -O3 -fPIC -lstdc++fs -ldl -Wno-unused-command-line-argument ) | 29 | add_definitions( -std=c++17 -O3 -fPIC ) |
30 | 30 | ||
31 | add_library( libmoonp MODULE src/MoonP/ast.cpp src/MoonP/parser.cpp src/MoonP/moon_parser.cpp src/MoonP/moon_compiler.cpp src/MoonP/moonplus.cpp) | 31 | add_library( libmoonp MODULE src/MoonP/ast.cpp src/MoonP/parser.cpp src/MoonP/moon_parser.cpp src/MoonP/moon_compiler.cpp src/MoonP/moonplus.cpp) |
32 | set_target_properties( libmoonp PROPERTIES PREFIX "" ) | 32 | set_target_properties( libmoonp PROPERTIES PREFIX "" ) |
@@ -35,6 +35,9 @@ target_link_libraries( libmoonp ${LUA_LIBRARIES} ) | |||
35 | 35 | ||
36 | add_executable( moonp src/MoonP/ast.cpp src/MoonP/moon_compiler.cpp src/MoonP/moon_parser.cpp src/MoonP/moonplus.cpp src/MoonP/parser.cpp src/moonp.cpp ) | 36 | add_executable( moonp src/MoonP/ast.cpp src/MoonP/moon_compiler.cpp src/MoonP/moon_parser.cpp src/MoonP/moonplus.cpp src/MoonP/parser.cpp src/moonp.cpp ) |
37 | target_link_libraries( moonp ${LUA_LIBRARIES} ) | 37 | target_link_libraries( moonp ${LUA_LIBRARIES} ) |
38 | if (CMAKE_CXX_COMPILER_ID STREQUAL "GNU") | ||
39 | target_link_options( moonp PRIVATE -ldl -lpthread -lstdc++fs ) | ||
40 | endif() | ||
38 | 41 | ||
39 | install(CODE "") | 42 | install(CODE "") |
40 | 43 | ||