Skip to content

Commit

Permalink
Extract Library libtrn to subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
LegalizeAdulthood committed Feb 19, 2024
1 parent 39c672d commit 6fee80c
Show file tree
Hide file tree
Showing 144 changed files with 86 additions and 81 deletions.
82 changes: 4 additions & 78 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,93 +14,18 @@ find_package(BISON REQUIRED)

set_property(GLOBAL PROPERTY USE_FOLDERS ON)

add_library(libtrn
addng.cpp addng.h
art.cpp art.h
artio.cpp artio.h
artsrch.cpp artsrch.h
artstate.h
autosub.cpp autosub.h
backpage.cpp backpage.h
bits.cpp bits.h
cache.cpp cache.h
charsubst.cpp charsubst.h
color.cpp color.h
datasrc.cpp datasrc.h
decode.cpp decode.h
edit_dist.cpp edit_dist.h
final.cpp final.h
hash.cpp hash.h
head.cpp head.h
help.cpp help.h
init.cpp init.h
intrp.cpp intrp.h
kfile.cpp kfile.h
last.cpp last.h
list.cpp list.h
mempool.cpp mempool.h
mime.cpp mime.h mime-internal.h
ng.cpp ng.h
ngdata.cpp ngdata.h
ngsrch.cpp ngsrch.h
ngstuff.cpp ngstuff.h
nntp.cpp nntp.h
only.cpp only.h
opt.cpp opt.h
patchlevel.h
rcln.cpp rcln.h
rcstuff.cpp rcstuff.h
respond.cpp respond.h
rt-ov.cpp rt-ov.h
rt-page.cpp rt-page.h
rt-process.cpp rt-process.h
rt-select.cpp rt-select.h
rt-util.cpp rt-util.h
rt-wumpus.cpp rt-wumpus.h
rthread.cpp rthread.h
sacmd.cpp sacmd.h
sadesc.cpp sadesc.h
sadisp.cpp sadisp.h
samain.cpp samain.h
samisc.cpp samisc.h
sathread.cpp sathread.h
scan.cpp scan.h
scanart.cpp scanart.h
scmd.cpp scmd.h
score-easy.cpp score-easy.h
score.cpp score.h
scorefile.cpp scorefile.h
scoresave.cpp scoresave.h
sdisp.cpp sdisp.h
search.cpp search.h
smisc.cpp smisc.h
sorder.cpp sorder.h
spage.cpp spage.h
sw.cpp sw.h
term.cpp term.h
trn.cpp trn.h
utf.cpp utf.h
univ.cpp univ.h
url.cpp url.h
util.cpp util.h
uudecode.cpp uudecode.h
)
# We require <filesystem>
target_compile_features(libtrn PUBLIC cxx_std_17)
source_group("Header Files" REGULAR_EXPRESSION "^.*\\.h$")
target_include_directories(libtrn PUBLIC .)
target_link_libraries(libtrn PUBLIC parsedate curses nntp)
set_property(TARGET libtrn PROPERTY FOLDER Libraries)

add_executable(inews inews.cpp)
target_include_directories(inews PRIVATE libtrn)
target_link_libraries(inews PUBLIC nntp tool)
set_property(TARGET inews PROPERTY FOLDER Tools)

add_executable(nntplist nntplist.cpp)
target_include_directories(nntplist PRIVATE libtrn)
target_link_libraries(nntplist PUBLIC nntp tool)
set_property(TARGET nntplist PROPERTY FOLDER Tools)

add_executable(trn-artchk trn-artchk.cpp)
target_include_directories(trn-artchk PRIVATE libtrn)
target_link_libraries(trn-artchk PUBLIC nntp tool)
set_property(TARGET trn-artchk PROPERTY FOLDER Tools)

Expand All @@ -124,6 +49,7 @@ source_group("Text Files" FILES ${trn_text_files})
target_link_libraries(trn PUBLIC libtrn)

add_subdirectory(config)
add_subdirectory(libtrn)
add_subdirectory(nntp)
add_subdirectory(parsedate)
add_subdirectory(tool)
Expand Down
79 changes: 79 additions & 0 deletions libtrn/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
add_library(libtrn
addng.cpp addng.h
art.cpp art.h
artio.cpp artio.h
artsrch.cpp artsrch.h
artstate.h
autosub.cpp autosub.h
backpage.cpp backpage.h
bits.cpp bits.h
cache.cpp cache.h
charsubst.cpp charsubst.h
color.cpp color.h
datasrc.cpp datasrc.h
decode.cpp decode.h
edit_dist.cpp edit_dist.h
enum-flags.h
final.cpp final.h
hash.cpp hash.h
head.cpp head.h
help.cpp help.h
init.cpp init.h
intrp.cpp intrp.h
kfile.cpp kfile.h
last.cpp last.h
list.cpp list.h
mempool.cpp mempool.h
mime.cpp mime.h mime-internal.h
ng.cpp ng.h
ngdata.cpp ngdata.h
ngsrch.cpp ngsrch.h
ngstuff.cpp ngstuff.h
nntp.cpp nntp.h
only.cpp only.h
opt.cpp opt.h
patchlevel.h
rcln.cpp rcln.h
rcstuff.cpp rcstuff.h
respond.cpp respond.h
rt-ov.cpp rt-ov.h
rt-page.cpp rt-page.h
rt-process.cpp rt-process.h
rt-select.cpp rt-select.h
rt-util.cpp rt-util.h
rt-wumpus.cpp rt-wumpus.h
rthread.cpp rthread.h
sacmd.cpp sacmd.h
sadesc.cpp sadesc.h
sadisp.cpp sadisp.h
samain.cpp samain.h
samisc.cpp samisc.h
sathread.cpp sathread.h
scan.cpp scan.h
scanart.cpp scanart.h
scmd.cpp scmd.h
score-easy.cpp score-easy.h
score.cpp score.h
scorefile.cpp scorefile.h
scoresave.cpp scoresave.h
sdisp.cpp sdisp.h
search.cpp search.h
smisc.cpp smisc.h
sorder.cpp sorder.h
spage.cpp spage.h
string-algos.h
sw.cpp sw.h
term.cpp term.h
trn.cpp trn.h
utf.cpp utf.h
univ.cpp univ.h
url.cpp url.h
util.cpp util.h
uudecode.cpp uudecode.h
)
# We require <filesystem>
target_compile_features(libtrn PUBLIC cxx_std_17)
source_group("Header Files" REGULAR_EXPRESSION "^.*\\.h$")
target_include_directories(libtrn PUBLIC .)
target_link_libraries(libtrn PUBLIC parsedate curses nntp)
set_property(TARGET libtrn PROPERTY FOLDER Libraries)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion nntp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ add_library(nntp
nntpinit.cpp nntpinit.h
)
target_include_directories(nntp PUBLIC .)
target_include_directories(nntp PRIVATE ..)
target_include_directories(nntp PRIVATE ../libtrn)
target_link_libraries(nntp PUBLIC boost::asio util)
set_property(TARGET nntp PROPERTY FOLDER Libraries)
2 changes: 1 addition & 1 deletion tool/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ add_library(tool
util3.cpp util3.h
)
target_include_directories(tool PUBLIC .)
target_include_directories(tool PRIVATE ..)
target_include_directories(tool PRIVATE ../libtrn)
target_link_libraries(tool PUBLIC nntp)
set_property(TARGET tool PROPERTY FOLDER Libraries)
2 changes: 1 addition & 1 deletion util/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ if(WIN32)
target_compile_definitions(util PUBLIC _CRT_DECLARE_NONSTDC_NAMES=1 _CRT_INTERNAL_NONSTDC_NAMES=1)
endif()
target_include_directories(util PUBLIC .)
target_include_directories(util PRIVATE .. ../tool)
target_include_directories(util PRIVATE ../libtrn ../tool)
target_link_libraries(util PUBLIC config)
set_property(TARGET util PROPERTY FOLDER Libraries)

0 comments on commit 6fee80c

Please sign in to comment.