qrencode: switch to CMake

Allows simplifying the Makefile. Also faster compilation.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2020-07-07 17:21:33 -07:00
parent 9464d4171d
commit da2249b0f7
2 changed files with 29 additions and 21 deletions
+15
View File
@@ -0,0 +1,15 @@
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -131,7 +131,11 @@ if(WITH_TOOLS)
add_executable(qrenc qrenc.c)
set_target_properties(qrenc PROPERTIES OUTPUT_NAME qrencode)
- target_link_libraries(qrenc qrencode PNG::PNG)
+ if(NOT WITHOUT_PNG)
+ target_link_libraries(qrenc qrencode PNG::PNG)
+ else()
+ target_link_libraries(qrenc qrencode)
+ endif()
if(MSVC)
target_link_libraries(qrenc ${GETOPT_LIBRARIES})