diff --git a/backends/template/CMakeLists.txt b/backends/template/CMakeLists.txt index b35d57a35ff8db8fe82e3167b00c11e4a412a19f..d0878729bb16d64384f49a4d6a99f062c7cabe07 100644 --- a/backends/template/CMakeLists.txt +++ b/backends/template/CMakeLists.txt @@ -4,7 +4,16 @@ FILE(GLOB SRC *.c *.cpp) ADD_EXECUTABLE(spectrum2_template_backend ${SRC}) +if (CMAKE_COMPILER_IS_GNUCXX) +if (NOT WIN32) target_link_libraries(spectrum2_template_backend transport pthread ${Boost_LIBRARIES} ${SWIFTEN_LIBRARY} ${LOG4CXX_LIBRARIES}) +else() +target_link_libraries(spectrum2_template_backend transport ${Boost_LIBRARIES} ${SWIFTEN_LIBRARY} ${LOG4CXX_LIBRARIES}) +endif() +else() +include_directories("${CMAKE_SOURCE_DIR}/msvc-deps/protobuf/libprotobuf") +target_link_libraries(spectrum2_template_backend transport libprotobuf ${Boost_LIBRARIES} ${SWIFTEN_LIBRARY} ${LOG4CXX_LIBRARIES}) +endif() #INSTALL(TARGETS spectrum2_template_backend RUNTIME DESTINATION bin)