44 lines
1.1 KiB
CMake
44 lines
1.1 KiB
CMake
CMAKE_MINIMUM_REQUIRED ( VERSION 2.8 )
|
|
|
|
PROJECT ( YAP_RAPTOR C )
|
|
|
|
SET ( YAP_RAPTOR_VERSION 0.1)
|
|
|
|
if (NOT YAP_FOUND)
|
|
FIND_PACKAGE(YAP REQUIRED)
|
|
ENDIF (NOT YAP_FOUND)
|
|
IF (NOT YAP_FOUND)
|
|
MESSAGE (SEND_ERROR "YAP was not found!")
|
|
ENDIF (NOT YAP_FOUND)
|
|
|
|
set (LBFGS_SRC liblbfgs-1.10)
|
|
|
|
INCLUDE_DIRECTORIES(
|
|
${CMAKE_CURRENT_SOURCE_DIR}/${LBFGS_SRC}/include
|
|
${CMAKE_CURRENT_BINARY_DIR}
|
|
${CMAKE_SOURCE_DIR}/include
|
|
|
|
)
|
|
|
|
SET ( LBFGS_SOURCES
|
|
|
|
${CMAKE_CURRENT_SOURCE_DIR}/${LBFGS_SRC}/lib/arithmetic_ansi.h ${CMAKE_CURRENT_SOURCE_DIR}/${LBFGS_SRC}/lib/arithmetic_sse_double.h ${CMAKE_CURRENT_SOURCE_DIR}/${LBFGS_SRC}/lib/arithmetic_sse_float.h ${CMAKE_CURRENT_SOURCE_DIR}/${LBFGS_SRC}/lib/lbfgs.c ${CMAKE_CURRENT_SOURCE_DIR}/yap_lbfgs.c)
|
|
|
|
add_library(LBFGS
|
|
${LBFGS_SOURCES})
|
|
|
|
TARGET_LINK_LIBRARIES(LBFGS
|
|
libYap
|
|
)
|
|
|
|
|
|
install(TARGETS LBFGS
|
|
LIBRARY DESTINATION ${YAP_INSTALL_DLLDIR}
|
|
RUNTIME DESTINATION ${YAP_INSTALL_DLLDIR}
|
|
ARCHIVE DESTINATION ${libdir}
|
|
|
|
)
|
|
|
|
INSTALL(FILES lbfgs.pl DESTINATION ${libpl})
|
|
|