1
0
mirror of https://git.code.sf.net/p/zint/code synced 2026-01-23 20:06:02 +00:00

Move getopt out of the frontend, because it's used in the backend's test, too

This commit is contained in:
Schaich
2021-03-30 19:00:24 +09:00
parent 779a318c93
commit 88bbeb862b
7 changed files with 19 additions and 8 deletions

View File

@@ -2,16 +2,8 @@
project(zint_frontend)
include(CheckFunctionExists)
check_function_exists(getopt HAVE_GETOPT)
set(zint_frontend_SRCS main.c)
if(NOT HAVE_GETOPT)
set(zint_frontend_SRCS ${zint_frontend_SRCS} getopt.c getopt1.c)
endif(NOT HAVE_GETOPT)
include_directories(BEFORE "${CMAKE_SOURCE_DIR}/backend")
add_executable(zint_frontend ${zint_frontend_SRCS})
@@ -19,6 +11,9 @@ add_executable(zint_frontend ${zint_frontend_SRCS})
set_target_properties(zint_frontend PROPERTIES OUTPUT_NAME "zint")
target_link_libraries(zint_frontend zint)
if(NOT HAVE_GETOPT)
target_link_libraries(zint_frontend zint_bundled_getopt)
endif(NOT HAVE_GETOPT)
install(TARGETS zint_frontend DESTINATION "${BIN_INSTALL_DIR}" RUNTIME)