tommath/CMakeLists.txt

21 lines
511 B
CMake

cmake_minimum_required(VERSION 3.6)
project(libtommath C)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
file(GLOB SOURCE_FILES ./bn*.c)
list(APPEND SOURCE_FILES
tommath.h
tommath_class.h
tommath_private.h
tommath_superclass.h
)
add_library(tommathShared SHARED ${SOURCE_FILES})
add_library(tommathStatic STATIC ${SOURCE_FILES})
# Install library
install(TARGETS tommathStatic tommathShared DESTINATION lib/)
# Install library headers
file(GLOB HEADERS *.h)
install(FILES ${HEADERS} DESTINATION include/)