File tree Expand file tree Collapse file tree 4 files changed +25
-17
lines changed Expand file tree Collapse file tree 4 files changed +25
-17
lines changed Original file line number Diff line number Diff line change @@ -4,15 +4,17 @@ set (qt4debugappender_sources
4
4
if (${BUILD_SHARED_LIBS} )
5
5
add_definitions (-D${log4cplus} _EXPORTS)
6
6
endif ()
7
- if (UNICODE)
8
- add_definitions (-DUNICODE -D_UNICODE -UMBCS -U_MBCS)
9
- endif (UNICODE)
10
7
11
8
find_package (Qt4 REQUIRED)
12
9
include (${QT_USE_FILE} )
13
10
14
11
set (qt4debugappender log4cplusqt4debugappender${log4cplus_postfix} )
15
12
add_library (${qt4debugappender} ${qt4debugappender_sources} )
13
+ if (UNICODE)
14
+ target_compile_definitions (${qt4debugappender} PUBLIC UNICODE)
15
+ target_compile_definitions (${qt4debugappender} PUBLIC _UNICODE)
16
+ add_definitions (-UMBCS -U_MBCS)
17
+ endif (UNICODE)
16
18
target_link_libraries (${qt4debugappender}
17
19
${log4cplus}
18
20
${QT_LIBRARIES}
Original file line number Diff line number Diff line change @@ -4,15 +4,17 @@ set (qt5debugappender_sources
4
4
if (${BUILD_SHARED_LIBS} )
5
5
add_definitions (-D${log4cplus} _EXPORTS)
6
6
endif ()
7
- if (UNICODE)
8
- add_definitions (-DUNICODE -D_UNICODE -UMBCS -U_MBCS)
9
- endif (UNICODE)
10
7
11
8
find_package (Qt5Core REQUIRED)
12
9
#include (${QT_USE_FILE})
13
10
14
11
set (qt5debugappender log4cplusqt5debugappender${log4cplus_postfix} )
15
12
add_library (${qt5debugappender} ${qt5debugappender_sources} )
13
+ if (UNICODE)
14
+ target_compile_definitions (${qt5debugappender} PUBLIC UNICODE)
15
+ target_compile_definitions (${qt5debugappender} PUBLIC _UNICODE)
16
+ add_definitions (-UMBCS -U_MBCS)
17
+ endif (UNICODE)
16
18
target_link_libraries (${qt5debugappender}
17
19
${log4cplus}
18
20
${Qt5Widgets_LIBRARIES}
Original file line number Diff line number Diff line change 1
- if (UNICODE)
2
- add_definitions (-DUNICODE -D_UNICODE -UMBCS -U_MBCS)
3
- endif (UNICODE)
4
-
5
1
message (STATUS "Threads: ${CMAKE_THREAD_LIBS_INIT} " )
6
-
7
2
set (loggingserver_sources loggingserver.cxx)
8
3
9
4
message (STATUS "Sources: ${loggingserver_sources} " )
10
5
11
- add_executable (loggingserver ${loggingserver_sources} )
12
- target_link_libraries (loggingserver ${log4cplus} )
6
+ set (loggingserver loggingserver${log4cplus_postfix} )
7
+ add_executable (${loggingserver} ${loggingserver_sources} )
8
+ if (UNICODE)
9
+ target_compile_definitions (${loggingserver} PUBLIC UNICODE)
10
+ target_compile_definitions (${loggingserver} PUBLIC _UNICODE)
11
+ add_definitions (-UMBCS -U_MBCS)
12
+ endif (UNICODE)
13
+ target_link_libraries (${loggingserver} ${log4cplus} )
13
14
14
- install (TARGETS loggingserver DESTINATION ${CMAKE_INSTALL_BINDIR} )
15
+ install (TARGETS ${ loggingserver} DESTINATION ${CMAKE_INSTALL_BINDIR} )
Original file line number Diff line number Diff line change @@ -67,9 +67,6 @@ endif ()
67
67
68
68
# Define _GNU_SOURCE so that functions like `pipe2()` are visible.
69
69
add_definitions (-D_GNU_SOURCE=1)
70
- if (UNICODE)
71
- add_definitions (-DUNICODE -D_UNICODE -UMBCS -U_MBCS)
72
- endif (UNICODE)
73
70
if (WIN32 )
74
71
add_definitions (-DMINGW_HAS_SECURE_API=1)
75
72
add_definitions (-D_WIN32_WINNT=${_WIN32_WINNT} )
@@ -85,6 +82,12 @@ endif (WIN32)
85
82
86
83
add_library (${log4cplus} ${log4cplus_sources} )
87
84
85
+ if (UNICODE)
86
+ target_compile_definitions (${log4cplus} PUBLIC UNICODE)
87
+ target_compile_definitions (${log4cplus} PUBLIC _UNICODE)
88
+ add_definitions (-UMBCS -U_MBCS)
89
+ endif (UNICODE)
90
+
88
91
set (log4cplus_LIBS ${CMAKE_THREAD_LIBS_INIT} )
89
92
if (LIBRT)
90
93
list (APPEND log4cplus_LIBS ${LIBRT} )
You can’t perform that action at this time.
0 commit comments