macro (GAMMU_TUNE_SHARED _target)
    if (CMAKE_COMPILER_IS_GNUCC)
        if (NOT CMAKE_COMPILER_IS_MINGW AND NOT CMAKE_COMPILER_IS_CYGWIN AND NOT CMAKE_COMPILER_IS_GNUCXX)
            set_property(TARGET ${_target} APPEND_STRING PROPERTY COMPILE_FLAGS " -fPIC")
        endif (NOT CMAKE_COMPILER_IS_MINGW AND NOT CMAKE_COMPILER_IS_CYGWIN AND NOT CMAKE_COMPILER_IS_GNUCXX)
    endif (CMAKE_COMPILER_IS_GNUCC)
endmacro (GAMMU_TUNE_SHARED)
