Author: hbelusca
Date: Thu Nov 3 15:47:45 2016
New Revision: 73110
URL:
http://svn.reactos.org/svn/reactos?rev=73110&view=rev
Log:
[CONUTILS]: Remove that overengineered splitted library stuff, and just rely on the
splitting of the source code files instead. This is simpler and does the same job as I
wanted to do initially (thanks Amine and Thomas for the feedback).
CORE-10504 #resolve
[APPS]: Use again just the conutils library.
The effect of these two modifications above is to partly revert r73024 (the code splitting
remains on the contrary).
[CMAKE]: Remove the "evil workaround" (revert r73027). See CORE-12206 for more
details.
Modified:
trunk/reactos/base/applications/cacls/CMakeLists.txt
trunk/reactos/base/applications/cmdutils/clip/CMakeLists.txt
trunk/reactos/base/applications/cmdutils/comp/CMakeLists.txt
trunk/reactos/base/applications/cmdutils/eventcreate/CMakeLists.txt
trunk/reactos/base/applications/cmdutils/help/CMakeLists.txt
trunk/reactos/base/applications/cmdutils/mode/CMakeLists.txt
trunk/reactos/base/applications/cmdutils/more/CMakeLists.txt
trunk/reactos/base/applications/logoff/CMakeLists.txt
trunk/reactos/base/applications/network/net/CMakeLists.txt
trunk/reactos/base/applications/network/wlanconf/CMakeLists.txt
trunk/reactos/base/applications/shutdown/CMakeLists.txt
trunk/reactos/base/system/chkdsk/CMakeLists.txt
trunk/reactos/base/system/diskpart/CMakeLists.txt
trunk/reactos/base/system/format/CMakeLists.txt
trunk/reactos/base/system/subst/CMakeLists.txt
trunk/reactos/sdk/cmake/CMakeMacros.cmake
trunk/reactos/sdk/lib/conutils/CMakeLists.txt
trunk/reactos/sdk/lib/conutils/README.txt
Modified: trunk/reactos/base/applications/cacls/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cacls/CM…
==============================================================================
--- trunk/reactos/base/applications/cacls/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cacls/CMakeLists.txt [iso-8859-1] Thu Nov 3 15:47:45
2016
@@ -3,6 +3,6 @@
add_executable(cacls cacls.c cacls.rc)
set_module_type(cacls win32cui UNICODE)
-target_link_libraries(cacls conutils_stream ${PSEH_LIB})
+target_link_libraries(cacls conutils ${PSEH_LIB})
add_importlibs(cacls advapi32 user32 shell32 msvcrt kernel32)
add_cd_file(TARGET cacls DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/applications/cmdutils/clip/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/clip/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/clip/CMakeLists.txt [iso-8859-1] Thu Nov 3
15:47:45 2016
@@ -3,6 +3,6 @@
add_executable(clip clip.c clip.rc)
set_module_type(clip win32cui UNICODE)
-target_link_libraries(clip conutils_stream ${PSEH_LIB})
+target_link_libraries(clip conutils ${PSEH_LIB})
add_importlibs(clip advapi32 user32 msvcrt kernel32)
add_cd_file(TARGET clip DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/applications/cmdutils/comp/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/comp/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/comp/CMakeLists.txt [iso-8859-1] Thu Nov 3
15:47:45 2016
@@ -3,6 +3,6 @@
add_executable(comp comp.c comp.rc)
set_module_type(comp win32cui UNICODE)
-target_link_libraries(comp conutils_stream ${PSEH_LIB})
+target_link_libraries(comp conutils ${PSEH_LIB})
add_importlibs(comp msvcrt kernel32)
add_cd_file(TARGET comp DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/applications/cmdutils/eventcreate/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/eventcreate/CMakeLists.txt [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/cmdutils/eventcreate/CMakeLists.txt [iso-8859-1] Thu
Nov 3 15:47:45 2016
@@ -7,6 +7,6 @@
add_executable(eventcreate eventcreate.c eventcreate.rc)
set_module_type(eventcreate win32cui UNICODE)
add_dependencies(eventcreate evtmsgstr)
-target_link_libraries(eventcreate conutils_stream ${PSEH_LIB})
+target_link_libraries(eventcreate conutils ${PSEH_LIB})
add_importlibs(eventcreate advapi32 msvcrt kernel32)
add_cd_file(TARGET eventcreate DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/applications/cmdutils/help/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/help/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/help/CMakeLists.txt [iso-8859-1] Thu Nov 3
15:47:45 2016
@@ -3,7 +3,7 @@
add_executable(cmd_help help.c help.rc)
set_module_type(cmd_help win32cui UNICODE)
-target_link_libraries(cmd_help conutils_stream ${PSEH_LIB})
+target_link_libraries(cmd_help conutils ${PSEH_LIB})
add_importlibs(cmd_help msvcrt kernel32)
set_target_properties(cmd_help PROPERTIES OUTPUT_NAME "help")
add_cd_file(TARGET cmd_help DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/applications/cmdutils/mode/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/mode/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/mode/CMakeLists.txt [iso-8859-1] Thu Nov 3
15:47:45 2016
@@ -3,7 +3,7 @@
add_executable(mode mode.c mode.rc)
set_module_type(mode win32cui UNICODE)
-target_link_libraries(mode conutils_stream ${PSEH_LIB})
+target_link_libraries(mode conutils ${PSEH_LIB})
add_importlibs(mode user32 msvcrt kernel32)
set_target_properties(mode PROPERTIES SUFFIX ".com")
add_cd_file(TARGET mode DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/applications/cmdutils/more/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/cmdutils…
==============================================================================
--- trunk/reactos/base/applications/cmdutils/more/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/applications/cmdutils/more/CMakeLists.txt [iso-8859-1] Thu Nov 3
15:47:45 2016
@@ -5,7 +5,7 @@
add_executable(more more.c more.rc)
set_module_type(more win32cui UNICODE)
-target_link_libraries(more conutils_pager ${PSEH_LIB})
+target_link_libraries(more conutils ${PSEH_LIB})
add_importlibs(more advapi32 user32 msvcrt kernel32)
set_target_properties(more PROPERTIES SUFFIX ".com")
add_cd_file(TARGET more DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/applications/logoff/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/logoff/C…
==============================================================================
--- trunk/reactos/base/applications/logoff/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/applications/logoff/CMakeLists.txt [iso-8859-1] Thu Nov 3 15:47:45
2016
@@ -3,6 +3,6 @@
add_executable(logoff logoff.c logoff.rc)
set_module_type(logoff win32cui UNICODE)
-target_link_libraries(logoff conutils_stream ${PSEH_LIB})
+target_link_libraries(logoff conutils ${PSEH_LIB})
add_importlibs(logoff advapi32 user32 msvcrt kernel32)
add_cd_file(TARGET logoff DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/applications/network/net/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/net/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/applications/network/net/CMakeLists.txt [iso-8859-1] Thu Nov 3
15:47:45 2016
@@ -19,7 +19,7 @@
add_executable(net ${SOURCE} net.rc)
set_module_type(net win32cui UNICODE)
-target_link_libraries(net conutils_stream ${PSEH_LIB})
+target_link_libraries(net conutils ${PSEH_LIB})
add_importlibs(net advapi32 netapi32 mpr msvcrt kernel32 ntdll)
add_pch(net net.h SOURCE)
add_cd_file(TARGET net DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/applications/network/wlanconf/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/network/…
==============================================================================
--- trunk/reactos/base/applications/network/wlanconf/CMakeLists.txt [iso-8859-1]
(original)
+++ trunk/reactos/base/applications/network/wlanconf/CMakeLists.txt [iso-8859-1] Thu Nov
3 15:47:45 2016
@@ -7,6 +7,6 @@
add_executable(wlanconf wlanconf.c wlanconf.rc)
set_module_type(wlanconf win32cui UNICODE)
-target_link_libraries(wlanconf conutils_stream ${PSEH_LIB})
+target_link_libraries(wlanconf conutils ${PSEH_LIB})
add_importlibs(wlanconf msvcrt iphlpapi kernel32)
add_cd_file(TARGET wlanconf DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/applications/shutdown/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/shutdown…
==============================================================================
--- trunk/reactos/base/applications/shutdown/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/applications/shutdown/CMakeLists.txt [iso-8859-1] Thu Nov 3
15:47:45 2016
@@ -9,7 +9,7 @@
add_executable(shutdown ${SOURCE} shutdown.rc)
set_module_type(shutdown win32cui UNICODE)
-target_link_libraries(shutdown conutils_stream ${PSEH_LIB})
+target_link_libraries(shutdown conutils ${PSEH_LIB})
add_importlibs(shutdown advapi32 user32 powrprof msvcrt kernel32)
add_pch(shutdown precomp.h SOURCE)
add_cd_file(TARGET shutdown DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/system/chkdsk/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/chkdsk/CMakeLi…
==============================================================================
--- trunk/reactos/base/system/chkdsk/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/system/chkdsk/CMakeLists.txt [iso-8859-1] Thu Nov 3 15:47:45 2016
@@ -4,6 +4,6 @@
add_executable(chkdsk chkdsk.c chkdsk.rc)
set_module_type(chkdsk win32cui UNICODE)
-target_link_libraries(chkdsk conutils_stream ${PSEH_LIB})
+target_link_libraries(chkdsk conutils ${PSEH_LIB})
add_importlibs(chkdsk fmifs msvcrt kernel32 ntdll)
add_cd_file(TARGET chkdsk DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/system/diskpart/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/diskpart/CMake…
==============================================================================
--- trunk/reactos/base/system/diskpart/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/system/diskpart/CMakeLists.txt [iso-8859-1] Thu Nov 3 15:47:45
2016
@@ -45,7 +45,7 @@
add_executable(diskpart ${SOURCE} diskpart.rc)
set_module_type(diskpart win32cui UNICODE)
-target_link_libraries(diskpart conutils_stream ${PSEH_LIB})
+target_link_libraries(diskpart conutils ${PSEH_LIB})
add_importlibs(diskpart advapi32 msvcrt kernel32 ntdll)
if(MSVC)
Modified: trunk/reactos/base/system/format/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/format/CMakeLi…
==============================================================================
--- trunk/reactos/base/system/format/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/system/format/CMakeLists.txt [iso-8859-1] Thu Nov 3 15:47:45 2016
@@ -4,7 +4,7 @@
add_executable(format format.c format.rc)
set_module_type(format win32cui UNICODE)
-target_link_libraries(format conutils_stream ${PSEH_LIB})
+target_link_libraries(format conutils ${PSEH_LIB})
add_importlibs(format fmifs msvcrt kernel32 ntdll)
set_target_properties(format PROPERTIES SUFFIX ".com")
add_cd_file(TARGET format DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/base/system/subst/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/subst/CMakeLis…
==============================================================================
--- trunk/reactos/base/system/subst/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/base/system/subst/CMakeLists.txt [iso-8859-1] Thu Nov 3 15:47:45 2016
@@ -3,6 +3,6 @@
add_executable(subst subst.c subst.rc)
set_module_type(subst win32cui UNICODE)
-target_link_libraries(subst conutils_stream ${PSEH_LIB})
+target_link_libraries(subst conutils ${PSEH_LIB})
add_importlibs(subst msvcrt kernel32 ntdll)
add_cd_file(TARGET subst DESTINATION reactos/system32 FOR all)
Modified: trunk/reactos/sdk/cmake/CMakeMacros.cmake
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/cmake/CMakeMacros.cmak…
==============================================================================
--- trunk/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] (original)
+++ trunk/reactos/sdk/cmake/CMakeMacros.cmake [iso-8859-1] Thu Nov 3 15:47:45 2016
@@ -496,18 +496,6 @@
function(add_library name)
_add_library(${name} ${ARGN})
-##
-## The following is a workaround for a CMake bug. Inspired by:
-##
http://stackoverflow.com/questions/24926868/cmake-3-0-add-library-of-type-i…
-##
-## Beginning of the workaround:
- get_target_property(_TARGET_TYPE ${name} TYPE)
- if(_TARGET_TYPE STREQUAL "INTERFACE_LIBRARY")
- unset(_target_excluded)
- else()
-##
-## This is the original code:
-##
get_target_property(_target_excluded ${name} EXCLUDE_FROM_ALL)
if(_target_excluded AND ${name} MATCHES "^lib.*")
set_property(TARGET "${name}" PROPERTY FOLDER
"Importlibs")
@@ -515,10 +503,6 @@
string(SUBSTRING ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_SOURCE_DIR_LENGTH} -1
CMAKE_CURRENT_SOURCE_DIR_RELATIVE)
set_property(TARGET "${name}" PROPERTY FOLDER
"${CMAKE_CURRENT_SOURCE_DIR_RELATIVE}")
endif()
-##
-## End of workaround
- endif()
-##
endfunction()
function(add_executable name)
Modified: trunk/reactos/sdk/lib/conutils/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/conutils/CMakeList…
==============================================================================
--- trunk/reactos/sdk/lib/conutils/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/conutils/CMakeLists.txt [iso-8859-1] Thu Nov 3 15:47:45 2016
@@ -1,36 +1,14 @@
-##
-## 'conutils_base': the base utility library.
-##
-add_library(conutils_base utils.c)
-add_dependencies(conutils_base xdk)
-target_link_libraries(conutils_base ${PSEH_LIB})
-add_importlibs(conutils_base msvcrt kernel32)
+list(APPEND SOURCE
+ pager.c
+ screen.c
+ stream.c
+ utils.c
+ # conutils.h
+ )
-##
-## 'conutils_stream': Console Stream API library.
-##
-add_library(conutils_stream stream.c)
-target_link_libraries(conutils_stream PUBLIC conutils_base)
-# add_dependencies(conutils_stream conutils_base xdk)
-
-##
-## 'conutils_screen': Console Screen API library.
-##
-add_library(conutils_screen screen.c)
-target_link_libraries(conutils_screen PUBLIC conutils_stream conutils_base)
-# add_dependencies(conutils_screen conutils_stream conutils_base xdk)
-
-##
-## 'conutils_pager': Console Pager API library.
-##
-add_library(conutils_pager pager.c)
-target_link_libraries(conutils_pager PUBLIC conutils_screen conutils_stream
conutils_base)
-# add_dependencies(conutils_pager conutils_screen conutils_stream conutils_base xdk)
-
-##
-## 'conutils': Library target that groups everything together.
-##
-add_library(conutils INTERFACE)
-target_link_libraries(conutils INTERFACE conutils_pager conutils_screen conutils_stream
conutils_base)
-# add_dependencies(conutils conutils_pager conutils_screen conutils_stream conutils_base
xdk)
+add_library(conutils ${SOURCE})
+# add_pch(conutils conutils.h SOURCE)
+add_dependencies(conutils xdk)
+target_link_libraries(conutils ${PSEH_LIB})
+add_importlibs(conutils msvcrt kernel32)
Modified: trunk/reactos/sdk/lib/conutils/README.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/sdk/lib/conutils/README.tx…
==============================================================================
--- trunk/reactos/sdk/lib/conutils/README.txt [iso-8859-1] (original)
+++ trunk/reactos/sdk/lib/conutils/README.txt [iso-8859-1] Thu Nov 3 15:47:45 2016
@@ -21,23 +21,23 @@
CONTENTS
~-~-~-~-
-0. 'conutils_base' library (utils.c and utils.h): Base set of functions for
- loading string resources and message strings, and handle type identification.
+0. 'conutils_base' (utils.c and utils.h): Base set of functions for loading
+ string resources and message strings, and handle type identification.
-1. 'conutils_stream' library (stream.c and stream.h): Console Stream API
(CON_STREAM):
+1. 'conutils_stream' (stream.c and stream.h): Console Stream API (CON_STREAM):
Stream initialization, basic ConStreamRead/Write. Stream utility functions:
ConPuts/Printf, ConResPuts/Printf, ConMsgPuts/Printf.
- Depends on the 'conutils_base' library.
+ Depends on 'conutils_base'.
-2. 'conutils_screen' library (screen.c and screen.h): Console Screen API
(CON_SCREEN):
+2. 'conutils_screen' (screen.c and screen.h): Console Screen API (CON_SCREEN):
Introduces the notion of console/terminal screen around the streams. Manages
console/terminal screen metrics for Win32 consoles and TTYs (serial...).
Additional Screen utility functions.
- Depends on the 'conutils_stream' library, and indirectly on
'conutils_base'.
+ Depends on 'conutils_stream', and indirectly on 'conutils_base'.
-3. 'conutils_pager' library (pager.c and pager.h): Console Pager API
(CON_PAGER):
+3. 'conutils_pager' (pager.c and pager.h): Console Pager API (CON_PAGER):
Implements core console/terminal paging functionality around console screens.
- Depends on the 'conutils_screen' library, and indirectly on
'conutils_stream'
- and 'conutils_base'.
+ Depends on 'conutils_screen' and indirectly on 'conutils_stream' and
+ 'conutils_base'.
4. More to come!