Skip to content

Commit 0a196dc

Browse files
author
Ken Matsui
authored
Merge pull request #84 from poacpm/develop
Improve CMakeLists.txt
2 parents 91c0c53 + c8c59db commit 0a196dc

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

CMakeLists.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,17 @@ if(${APPLE})
3535
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -I/usr/local/opt/llvm/include")
3636
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -L/usr/local/opt/llvm/lib")
3737
endif()
38+
else()
39+
set(STATIC_LINK_FLAG "-static")
3840
endif()
3941

4042
add_executable(${PROJECT_NAME} main.cpp)
4143
target_link_libraries(${PROJECT_NAME}
42-
"/usr/local/lib/libboost_filesystem-mt.a"
43-
"/usr/local/lib/libboost_system-mt.a"
44+
"${STATIC_LINK_FLAG}"
45+
"boost_filesystem"
46+
"boost_system"
4447
"ssl"
4548
"crypto"
49+
"dl"
4650
"yaml-cpp")
4751
install(TARGETS poac DESTINATION bin)

0 commit comments

Comments
 (0)