From a22d1da5112041950cab136df4d9d78fef3ee8e9 Mon Sep 17 00:00:00 2001 From: nsubiron Date: Thu, 16 Mar 2017 16:55:32 +0100 Subject: [PATCH] Tweaks to build system --- Source/CarlaServer/CMakeLists.txt | 1 + Source/CarlaServer/Makefile | 1 + Source/CarlaServer/source/carla/server/CMakeLists.txt | 2 +- 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/Source/CarlaServer/CMakeLists.txt b/Source/CarlaServer/CMakeLists.txt index 78bd8cd0a..a33491c1c 100644 --- a/Source/CarlaServer/CMakeLists.txt +++ b/Source/CarlaServer/CMakeLists.txt @@ -3,6 +3,7 @@ project (CarlaServer) if (UNIX) set(CMAKE_CXX_COMPILER clang++) + set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC") find_package(Threads) endif (UNIX) diff --git a/Source/CarlaServer/Makefile b/Source/CarlaServer/Makefile index e65eee377..2755f424a 100644 --- a/Source/CarlaServer/Makefile +++ b/Source/CarlaServer/Makefile @@ -16,6 +16,7 @@ $(PROTOBUF_SRC_DIR)/%.pb.cc: $(PROTOBUF_SRC_DIR)/%.proto protoc -I=$(PROTOBUF_SRC_DIR) --cpp_out=$(PROTOBUF_SRC_DIR) $< clean: + rm -f $(PROTOBUF_SRC_DIR)/carla_protocol.pb.* rm -Rf build CMakeFiles clean-all: clean diff --git a/Source/CarlaServer/source/carla/server/CMakeLists.txt b/Source/CarlaServer/source/carla/server/CMakeLists.txt index eafea14f4..6f899d03c 100644 --- a/Source/CarlaServer/source/carla/server/CMakeLists.txt +++ b/Source/CarlaServer/source/carla/server/CMakeLists.txt @@ -5,4 +5,4 @@ file(GLOB carla_server_SRC "*.pb.cc" ) -add_library(carla_server ../CarlaServer.cpp ${carla_server_SRC}) +add_library(carla_server STATIC ../CarlaServer.cpp ${carla_server_SRC})