2020-05-06 11:40:06 -04:00
|
|
|
file(GLOB CMD_SOURCES "*.cpp")
|
2020-06-23 23:57:00 -04:00
|
|
|
list(APPEND SPECIAL_TARGETS "test" "install")
|
2020-05-06 11:40:06 -04:00
|
|
|
|
|
|
|
foreach(CMD_SRC ${CMD_SOURCES})
|
|
|
|
get_filename_component(CMD_NAME ${CMD_SRC} NAME_WE)
|
2020-06-23 23:57:00 -04:00
|
|
|
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 11:40:06 -04: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 16:19:57 -04:00
|
|
|
target_link_libraries(html LibWeb)
|
|
|
|
target_link_libraries(js LibJS LibLine)
|
|
|
|
target_link_libraries(keymap LibKeyboard)
|
2020-05-06 11:40:06 -04:00
|
|
|
target_link_libraries(lspci LibPCIDB)
|
|
|
|
target_link_libraries(man LibMarkdown)
|
|
|
|
target_link_libraries(md LibMarkdown)
|
2020-08-15 10:21:31 -04:00
|
|
|
target_link_libraries(misbehaving-application LibCore)
|
2020-05-06 11:40:06 -04:00
|
|
|
target_link_libraries(notify LibGUI)
|
|
|
|
target_link_libraries(open LibDesktop)
|
|
|
|
target_link_libraries(pape LibGUI)
|
2020-07-25 18:08:55 -04:00
|
|
|
target_link_libraries(passwd LibCrypt)
|
2020-05-06 11:40:06 -04:00
|
|
|
target_link_libraries(paste LibGUI)
|
|
|
|
target_link_libraries(pro LibProtocol)
|
2020-07-25 20:36:32 -04:00
|
|
|
target_link_libraries(su LibCrypt)
|
2020-05-06 11:40:06 -04:00
|
|
|
target_link_libraries(test-crypto LibCrypto LibTLS LibLine)
|
2020-08-01 16:01:39 -04:00
|
|
|
target_link_libraries(test-compress LibCompress)
|
2020-07-03 17:36:58 -04:00
|
|
|
target_link_libraries(test-js LibJS LibLine LibCore)
|
2020-07-23 02:53:52 -04:00
|
|
|
target_link_libraries(test-web LibWeb)
|
2020-05-06 11:40:06 -04:00
|
|
|
target_link_libraries(tt LibPthread)
|
2020-08-28 11:54:49 -04:00
|
|
|
target_link_libraries(gunzip LibCompress)
|
2020-08-01 15:18:32 -04:00
|
|
|
|
|
|
|
add_subdirectory(Tests)
|