2018-02-28 15:40:21 +01:00
|
|
|
cmake_minimum_required(VERSION 3.6)
|
2019-07-03 18:27:11 +02:00
|
|
|
project(libtommath C)
|
2018-02-28 15:40:21 +01:00
|
|
|
|
|
|
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
|
|
|
|
2019-07-03 18:27:11 +02:00
|
|
|
file(GLOB SOURCE_FILES ./bn*.c)
|
|
|
|
list(APPEND SOURCE_FILES
|
2018-02-28 15:40:21 +01:00
|
|
|
tommath.h
|
|
|
|
tommath_class.h
|
|
|
|
tommath_private.h
|
2019-07-03 18:27:11 +02:00
|
|
|
tommath_superclass.h
|
|
|
|
)
|
2018-02-28 15:40:21 +01:00
|
|
|
|
|
|
|
add_library(tommathShared SHARED ${SOURCE_FILES})
|
|
|
|
add_library(tommathStatic STATIC ${SOURCE_FILES})
|
|
|
|
|
|
|
|
# Install library
|
2019-07-03 18:27:11 +02:00
|
|
|
install(TARGETS tommathStatic tommathShared DESTINATION lib/)
|
2018-02-28 15:40:21 +01:00
|
|
|
# Install library headers
|
|
|
|
file(GLOB HEADERS *.h)
|
|
|
|
install(FILES ${HEADERS} DESTINATION include/)
|