From 348401e7b8a769a772b3eb26d9edca3564261f21 Mon Sep 17 00:00:00 2001 From: Petri Lehtinen Date: Wed, 2 Jul 2014 22:04:33 +0300 Subject: [PATCH] CMake: Use add_definitions for compiler flags Fixes #193. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 91aa11a..1827da4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -105,7 +105,7 @@ if (MSVC) endif() if (NOT WIN32 AND (CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)) - set(CMAKE_C_FLAGS "-fPIC") + add_definitions("-fPIC") endif() check_include_files (endian.h HAVE_ENDIAN_H)