From: José Fonseca Date: Sun, 5 Jun 2011 00:32:16 +0000 (+0100) Subject: Use CMAKE_SHARED_LIBRARY_C_FLAGS instead of -fPIC. X-Git-Url: https://git.cworth.org/git?a=commitdiff_plain;h=a345339875b76b631493d790c64bf9d3e95a1e29;p=apitrace Use CMAKE_SHARED_LIBRARY_C_FLAGS instead of -fPIC. --- 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}" +)