somake/CMakeLists.txt

50 lines
1.8 KiB
CMake
Raw Normal View History

2016-08-21 13:16:42 +00:00
# 2016, Georg Sauthoff <mail@georg.so>
cmake_minimum_required(VERSION 2.8)
project(somake C CXX)
add_library(mksh STATIC
lib/mksh/dosys.cc lib/mksh/globals.cc lib/mksh/i18n.cc lib/mksh/macro.cc
lib/mksh/misc.cc lib/mksh/mksh.cc lib/mksh/read.cc
)
add_library(vroot STATIC
lib/vroot/access.cc lib/vroot/chown.cc lib/vroot/lock.cc
lib/vroot/open.cc lib/vroot/setenv.cc lib/vroot/utimes.cc
lib/vroot/args.cc lib/vroot/chroot.cc lib/vroot/lstat.cc
lib/vroot/readlink.cc lib/vroot/stat.cc lib/vroot/vroot.cc
lib/vroot/chdir.cc lib/vroot/creat.cc lib/vroot/mkdir.cc
lib/vroot/report.cc lib/vroot/truncate.cc lib/vroot/chmod.cc
lib/vroot/execve.cc lib/vroot/mount.cc lib/vroot/rmdir.cc
lib/vroot/unlink.cc
)
2016-08-22 18:55:39 +00:00
add_executable(${PROJECT_NAME}
2016-08-21 13:16:42 +00:00
bin/ar.cc bin/depvar.cc bin/doname.cc bin/dosys.cc
bin/files.cc bin/globals.cc bin/implicit.cc bin/macro.cc
bin/main.cc bin/misc.cc bin/nse_printdep.cc bin/parallel.cc
bin/pmake.cc bin/read.cc bin/read2.cc bin/rep.cc
bin/state.cc
2016-08-21 13:20:41 +00:00
comp/progname.c
2016-08-21 13:16:42 +00:00
)
2016-08-22 18:55:39 +00:00
set_property(TARGET ${PROJECT_NAME} mksh vroot PROPERTY INCLUDE_DIRECTORIES
2016-08-21 13:16:42 +00:00
${CMAKE_CURRENT_SOURCE_DIR}/include
${CMAKE_CURRENT_SOURCE_DIR}
)
2016-08-22 18:55:39 +00:00
target_link_libraries(${PROJECT_NAME}
2016-08-21 13:16:42 +00:00
mksh vroot pthread
)
2016-08-22 18:55:39 +00:00
install(TARGETS ${PROJECT_NAME} RUNTIME DESTINATION bin)
install(FILES man/man1/make.1 DESTINATION share/man/man1)
install(FILES bin/make.rules.file DESTINATION share/${PROJECT_NAME}
RENAME make.rules)
install(FILES bin/svr4.make.rules.file DESTINATION share/${PROJECT_NAME}
RENAME svr4.make.rules)
install(FILES README.md DESTINATION share/doc/${PROJECT_NAME}
)
install(DIRECTORY example DESTINATION share/doc/${PROJECT_NAME}
)