2020-05-06 18:40:06 +03:00
|
|
|
file(GLOB CMD_SOURCES "*.cpp")
|
2020-06-24 08:27:00 +04:30
|
|
|
list(APPEND SPECIAL_TARGETS "test" "install")
|
2020-05-06 18:40:06 +03:00
|
|
|
|
|
|
|
foreach(CMD_SRC ${CMD_SOURCES})
|
|
|
|
get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE)
|
2020-06-24 08:27:00 +04:30
|
|
|
if (CMD_NAME IN_LIST SPECIAL_TARGETS)
|
|
|
|
add_executable("${CMD_NAME}-bin" ${CMD_SRC})
|
|
|
|
target_link_libraries("${CMD_NAME}-bin" LibCore)
|
|
|
|
install(TARGETS "${CMD_NAME}-bin" RUNTIME DESTINATION bin)
|
|
|
|
install(CODE "execute_process(COMMAND mv ${CMD_NAME}-bin ${CMD_NAME} WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX}/bin)")
|
|
|
|
else ()
|
|
|
|
add_executable(${CMD_NAME} ${CMD_SRC})
|
|
|
|
target_link_libraries(${CMD_NAME} LibCore)
|
|
|
|
install(TARGETS ${CMD_NAME} RUNTIME DESTINATION bin)
|
|
|
|
endif()
|
2020-05-06 18:40:06 +03:00
|
|
|
endforeach()
|
|
|
|
|
|
|
|
target_link_libraries(aplay LibAudio)
|
|
|
|
target_link_libraries(avol LibAudio)
|
|
|
|
target_link_libraries(copy LibGUI)
|
|
|
|
target_link_libraries(disasm LibX86)
|
|
|
|
target_link_libraries(functrace LibDebug LibX86)
|
2020-06-18 22:19:57 +02:00
|
|
|
target_link_libraries(html LibWeb)
|
|
|
|
target_link_libraries(js LibJS LibLine)
|
|
|
|
target_link_libraries(keymap LibKeyboard)
|
2020-05-06 18:40:06 +03:00
|
|
|
target_link_libraries(lspci LibPCIDB)
|
|
|
|
target_link_libraries(man LibMarkdown)
|
|
|
|
target_link_libraries(md LibMarkdown)
|
2020-08-15 16:21:31 +02:00
|
|
|
target_link_libraries(misbehaving-application LibCore)
|
2020-05-06 18:40:06 +03:00
|
|
|
target_link_libraries(notify LibGUI)
|
|
|
|
target_link_libraries(open LibDesktop)
|
|
|
|
target_link_libraries(pape LibGUI)
|
2020-07-25 16:08:55 -06:00
|
|
|
target_link_libraries(passwd LibCrypt)
|
2020-05-06 18:40:06 +03:00
|
|
|
target_link_libraries(paste LibGUI)
|
|
|
|
target_link_libraries(pro LibProtocol)
|
2020-07-25 18:36:32 -06:00
|
|
|
target_link_libraries(su LibCrypt)
|
2020-05-06 18:40:06 +03:00
|
|
|
target_link_libraries(test-crypto LibCrypto LibTLS LibLine)
|
2020-08-01 22:01:39 +02:00
|
|
|
target_link_libraries(test-compress LibCompress)
|
2020-07-03 14:36:58 -07:00
|
|
|
target_link_libraries(test-js LibJS LibLine LibCore)
|
2020-07-23 07:53:52 +01:00
|
|
|
target_link_libraries(test-web LibWeb)
|
2020-05-06 18:40:06 +03:00
|
|
|
target_link_libraries(tt LibPthread)
|
2020-08-28 17:54:49 +02:00
|
|
|
target_link_libraries(gunzip LibCompress)
|
2020-08-01 21:18:32 +02:00
|
|
|
|
|
|
|
add_subdirectory(Tests)
|