46 lines
1.3 KiB
CMake
46 lines
1.3 KiB
CMake
option(SMPLXMPP_BUILD_SMPLXMPP "build smplxmpp binary" ON)
|
|
option(SMPLXMPP_INSTALL_SMPLXMPP "install smplxmpp binary" ON)
|
|
|
|
if (SMPLXMPP_BUILD_SMPLXMPP)
|
|
add_executable(smplxmpp "${CMAKE_CURRENT_LIST_DIR}/smplxmpp.cc")
|
|
target_compile_features(smplxmpp PUBLIC cxx_std_11)
|
|
|
|
target_link_libraries(smplxmpp PRIVATE "${SMPLXMPP_SPDLOG_LIBS}")
|
|
target_link_libraries(smplxmpp PUBLIC
|
|
smplxmpp_core
|
|
smplxmpp_util
|
|
Threads::Threads
|
|
gloox
|
|
)
|
|
|
|
if(SMPLXMPP_INSTALL_SMPLXMPP)
|
|
install(TARGETS smplxmpp
|
|
DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}"
|
|
)
|
|
endif()
|
|
endif()
|
|
|
|
|
|
option(SMPLXMPP_BUILD_SMPLXMPP_NL "build smplxmpp-nl binary" ON)
|
|
option(SMPLXMPP_INSTALL_SMPLXMPP_NL "install smplxmpp-nl binary" ON)
|
|
|
|
if (SMPLXMPP_BUILD_SMPLXMPP_NL)
|
|
add_executable(smplxmpp-nl "${CMAKE_CURRENT_LIST_DIR}/smplxmpp-nl.cc")
|
|
target_compile_features(smplxmpp-nl PUBLIC cxx_std_11)
|
|
|
|
target_link_libraries(smplxmpp-nl PUBLIC
|
|
smplxmpp_util
|
|
)
|
|
|
|
target_include_directories(smplxmpp-nl PUBLIC
|
|
include/
|
|
"${PROJECT_BINARY_DIR}/include/"
|
|
)
|
|
|
|
if (SMPLXMPP_INSTALL_SMPLXMPP_NL)
|
|
install(TARGETS smplxmpp-nl
|
|
DESTINATION "${CMAKE_INSTALL_FULL_BINDIR}"
|
|
)
|
|
endif()
|
|
endif()
|