diff --git a/depends/protobuf/CMakeLists.txt b/depends/protobuf/CMakeLists.txt index f8a1bdab8..4fec34125 100644 --- a/depends/protobuf/CMakeLists.txt +++ b/depends/protobuf/CMakeLists.txt @@ -232,17 +232,17 @@ install(TARGETS protobuf-lite LIBRARY DESTINATION ${DFHACK_LIBRARY_DESTINATION} RUNTIME DESTINATION ${DFHACK_LIBRARY_DESTINATION}) -# Protobuf compiler shared library +IF(NOT CMAKE_CROSSCOMPILING) + # Protobuf compiler shared library -ADD_LIBRARY(protoc SHARED ${LIBPROTOC_SRCS} ${LIBPROTOC_HDRS}) -IDE_FOLDER(protoc "Depends") + ADD_LIBRARY(protoc SHARED ${LIBPROTOC_SRCS} ${LIBPROTOC_HDRS}) + IDE_FOLDER(protoc "Depends") -SET_TARGET_PROPERTIES(protoc PROPERTIES COMPILE_DEFINITIONS LIBPROTOC_EXPORTS) -TARGET_LINK_LIBRARIES(protoc protobuf) + SET_TARGET_PROPERTIES(protoc PROPERTIES COMPILE_DEFINITIONS LIBPROTOC_EXPORTS) + TARGET_LINK_LIBRARIES(protoc protobuf) -# Protobuf compiler executable + # Protobuf compiler executable -IF(NOT CMAKE_CROSSCOMPILING) ADD_EXECUTABLE(protoc-bin google/protobuf/compiler/main.cc google/protobuf/compiler/command_line_interface.h google/protobuf/compiler/cpp/cpp_generator.h) IDE_FOLDER(protoc-bin "Depends")