diff --git a/CMakeLists.txt b/CMakeLists.txt index 088df9d..260132a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -24,11 +24,11 @@ if(DEFINED CMAKE_C_FLAGS_DEBUG) else() set(CMAKE_C_FLAGS_DEBUG "-O0 -Wextra") endif() -if(DEFINED CMAKE_C_FLAGS) - string(APPEND CMAKE_C_FLAGS " -Wall -Werror") -else() - set(CMAKE_C_FLAGS "-Wall -Werror") +if(NOT DEFINED CMAKE_C_FLAGS) + set(CMAKE_C_FLAGS "") endif() +string(APPEND CMAKE_C_FLAGS + " -DG_LOG_DOMAIN=\\\"${PROJECT_NAME}\\\" -Wall -Werror") set(CMAKE_STATIC_LINKER_FLAGS "-static") diff --git a/src/config.h.in b/src/config.h.in index ed7333a..0290c99 100644 --- a/src/config.h.in +++ b/src/config.h.in @@ -1,3 +1,6 @@ +#ifndef _RIFIUTI2_CONFIG_H +#define _RIFIUTI2_CONFIG_H + #cmakedefine PROJECT_NAME "@PROJECT_NAME@" #cmakedefine PROJECT_VERSION "@PROJECT_VERSION@" #cmakedefine PROJECT_DESCRIPTION "@PROJECT_DESCRIPTION@" @@ -6,4 +9,4 @@ #cmakedefine PROJECT_TOOL_USAGE_URL "@PROJECT_TOOL_USAGE_URL@" #cmakedefine PROJECT_GH_PAGE "@PROJECT_GH_PAGE@" -#define G_LOG_DOMAIN PROJECT_NAME +#endif