mirror of
https://github.com/reactos/reactos.git
synced 2024-06-28 08:51:29 +00:00
[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. svn path=/trunk/; revision=73110
This commit is contained in:
parent
ee601ad450
commit
79c7b07668
|
@ -3,6 +3,6 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
|
|||
|
||||
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)
|
||||
|
|
|
@ -3,6 +3,6 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
|
|||
|
||||
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)
|
||||
|
|
|
@ -3,6 +3,6 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
|
|||
|
||||
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)
|
||||
|
|
|
@ -7,6 +7,6 @@ add_message_headers(ANSI evtmsgstr.mc)
|
|||
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)
|
||||
|
|
|
@ -3,7 +3,7 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
|
|||
|
||||
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)
|
||||
|
|
|
@ -3,7 +3,7 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
|
|||
|
||||
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)
|
||||
|
|
|
@ -5,7 +5,7 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
|
|||
|
||||
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)
|
||||
|
|
|
@ -3,6 +3,6 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
|
|||
|
||||
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)
|
||||
|
|
|
@ -19,7 +19,7 @@ list(APPEND SOURCE
|
|||
|
||||
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)
|
||||
|
|
|
@ -7,6 +7,6 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
|
|||
|
||||
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)
|
||||
|
|
|
@ -9,7 +9,7 @@ list(APPEND SOURCE
|
|||
|
||||
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)
|
||||
|
|
|
@ -4,6 +4,6 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
|
|||
|
||||
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)
|
||||
|
|
|
@ -45,7 +45,7 @@ list(APPEND SOURCE
|
|||
|
||||
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)
|
||||
|
|
|
@ -4,7 +4,7 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
|
|||
|
||||
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)
|
||||
|
|
|
@ -3,6 +3,6 @@ include_directories(${REACTOS_SOURCE_DIR}/sdk/lib/conutils)
|
|||
|
||||
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)
|
||||
|
|
|
@ -496,18 +496,6 @@ elseif(USE_FOLDER_STRUCTURE)
|
|||
|
||||
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-interface-breaks-get-target-property
|
||||
##
|
||||
## 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 @@ elseif(USE_FOLDER_STRUCTURE)
|
|||
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)
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -21,23 +21,23 @@ together with printf-like functionality.
|
|||
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!
|
||||
|
|
Loading…
Reference in a new issue