Backtrace generation depends on the target system, not the host
authorManuel Nickschas <sputnick@quassel-irc.org>
Sat, 22 Mar 2014 18:30:21 +0000 (19:30 +0100)
committerManuel Nickschas <sputnick@quassel-irc.org>
Sat, 22 Mar 2014 18:33:27 +0000 (19:33 +0100)
We were checking for CMAKE_HOST_WIN32 and CMAKE_HOST_UNIX for determining
which kind of backtrace generation support to build. However, this should
obviously depend on the target platform, not on the platform we build on.

So let's use WIN32 and UNIX instead.

src/common/CMakeLists.txt

index 6a44218..0191c81 100644 (file)
@@ -58,12 +58,11 @@ if(APPLE)
   set(SOURCES ${SOURCES} mac_utils.cpp)
 endif(APPLE)
 
   set(SOURCES ${SOURCES} mac_utils.cpp)
 endif(APPLE)
 
-if(CMAKE_HOST_WIN32)
+if (WIN32)
     set(SOURCES ${SOURCES} logbacktrace_win.cpp)
     set(SOURCES ${SOURCES} logbacktrace_win.cpp)
-endif(CMAKE_HOST_WIN32)
-if(CMAKE_HOST_UNIX)
+elseif (UNIX)
     set(SOURCES ${SOURCES} logbacktrace_unix.cpp)
     set(SOURCES ${SOURCES} logbacktrace_unix.cpp)
-endif(CMAKE_HOST_UNIX)
+endif()
 
 add_library(mod_common STATIC ${SOURCES})
 qt_use_modules(mod_common Core Network)
 
 add_library(mod_common STATIC ${SOURCES})
 qt_use_modules(mod_common Core Network)