21 lines
624 B

cmake_policy(SET CMP0015 NEW)
set(CMAKE_AUTOMOC OFF)
set(CMAKE_ASM_COMPILER "yasm")
include_directories(${Boost_INCLUDE_DIRS})
set(EXECUTABLE secp256k1)
file(GLOB HEADERS "*.h")
if(ETH_STATIC)
add_library(${EXECUTABLE} STATIC ${EXECUTABLE}.c)
else()
add_library(${EXECUTABLE} SHARED ${EXECUTABLE}.c)
endif()
set_target_properties(${EXECUTABLE} PROPERTIES COMPILE_FLAGS "/TP")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DUSE_NUM_BOOST -DUSE_FIELD_10X26 -DUSE_FIELD_INV_BUILTIN")
install( TARGETS ${EXECUTABLE} ARCHIVE DESTINATION lib LIBRARY DESTINATION lib )
install( FILES ${HEADERS} DESTINATION include/${EXECUTABLE} )