lpac/interface/apdu/CMakeLists.txt
Coelacanthus 04bd397ea4
feat: add CPack support (#39)
* chore: use GNUInstallDirs

Signed-off-by: Coelacanthus <CoelacanthusHex@gmail.com>

* feat: add CPack support

Signed-off-by: Coelacanthus <CoelacanthusHex@gmail.com>

* fix: Time.h and time.h conflict

* fix: ${DL_LIBRARY} use before init

Signed-off-by: Coelacanthus <CoelacanthusHex@gmail.com>

---------

Signed-off-by: Coelacanthus <CoelacanthusHex@gmail.com>
2024-02-09 00:02:45 +08:00

33 lines
1.5 KiB
CMake

add_library(apduinterface_pcsc SHARED pcsc.c)
target_link_libraries(apduinterface_pcsc euicc cjson-static)
set_target_properties(apduinterface_pcsc PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/output")
set_target_properties(apduinterface_pcsc PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/output")
if(UNIX)
install(TARGETS apduinterface_pcsc LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/lpac")
endif()
if(MINGW OR CYGWIN)
target_link_libraries(apduinterface_pcsc winscard)
elseif(APPLE)
target_link_libraries(apduinterface_pcsc "-framework PCSC")
else()
find_package(PCSCLite)
target_link_libraries(apduinterface_pcsc PCSCLite::PCSCLite)
endif()
add_library(apduinterface_at SHARED at.c)
target_link_libraries(apduinterface_at euicc)
set_target_properties(apduinterface_at PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/output")
set_target_properties(apduinterface_at PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/output")
if(UNIX)
install(TARGETS apduinterface_at LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/lpac")
endif()
add_library(apduinterface_stdio SHARED stdio.c)
target_link_libraries(apduinterface_stdio euicc cjson-static)
set_target_properties(apduinterface_stdio PROPERTIES LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/output")
set_target_properties(apduinterface_stdio PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/output")
if(UNIX)
install(TARGETS apduinterface_stdio LIBRARY DESTINATION "${CMAKE_INSTALL_LIBDIR}/lpac")
endif()