From a345339875b76b631493d790c64bf9d3e95a1e29 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Sun, 5 Jun 2011 01:32:16 +0100 Subject: [PATCH] Use CMAKE_SHARED_LIBRARY_C_FLAGS instead of -fPIC. --- libpng/CMakeLists.txt | 8 ++++---- zlib/CMakeLists.txt | 8 ++++---- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libpng/CMakeLists.txt b/libpng/CMakeLists.txt index 2ce40e1..def8c5b 100644 --- a/libpng/CMakeLists.txt +++ b/libpng/CMakeLists.txt @@ -1,9 +1,5 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -if (NOT WIN32) - add_definitions (-fPIC) -endif (NOT WIN32) - add_library (png STATIC png.c pngerror.c @@ -21,3 +17,7 @@ add_library (png STATIC pngwtran.c pngwutil.c ) + +set_target_properties (png PROPERTIES + COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}" +) diff --git a/zlib/CMakeLists.txt b/zlib/CMakeLists.txt index ff910ce..24a97a6 100644 --- a/zlib/CMakeLists.txt +++ b/zlib/CMakeLists.txt @@ -1,9 +1,5 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}) -if (NOT WIN32) - add_definitions (-fPIC) -endif (NOT WIN32) - add_library (zlib STATIC adler32.c compress.c @@ -18,3 +14,7 @@ add_library (zlib STATIC inftrees.c inffast.c ) + +set_target_properties (zlib PROPERTIES + COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}" +) -- 2.43.0