Added CMake option for statically linking the binary.

This commit is contained in:
2016-11-24 22:46:44 +01:00
parent f11097180a
commit 78511d9929
3 changed files with 36 additions and 9 deletions

View File

@@ -1,5 +1,7 @@
set(target anthem-app)
find_package(Boost 1.55.0 COMPONENTS program_options system filesystem REQUIRED)
file(GLOB core_sources "*.cpp")
file(GLOB core_headers "*.h")
@@ -8,6 +10,16 @@ set(sources
${core_headers}
)
set(includes
${Boost_INCLUDE_DIRS}
)
set(libraries
${Boost_LIBRARIES}
anthem
)
add_executable(${target} ${sources})
target_link_libraries(${target} anthem)
target_include_directories(${target} PRIVATE ${includes})
target_link_libraries(${target} PRIVATE ${libraries})
set_target_properties(${target} PROPERTIES OUTPUT_NAME anthem)