2021-09-03 03:56:47 +03:00
|
|
|
cmake_minimum_required(VERSION 3.11)
|
|
|
|
cmake_policy(VERSION 3.11)
|
|
|
|
|
|
|
|
project(autodock-vina)
|
|
|
|
|
2023-08-02 17:58:07 +02:00
|
|
|
set(GIT_VERSION v1.2.5)
|
2021-09-03 03:56:47 +03:00
|
|
|
set(CMAKE_CXX_STANDARD 11)
|
|
|
|
|
2021-11-16 01:32:46 +01:00
|
|
|
find_package(Boost REQUIRED COMPONENTS
|
2021-09-03 03:56:47 +03:00
|
|
|
filesystem
|
|
|
|
log
|
|
|
|
program_options
|
|
|
|
random
|
|
|
|
serialization
|
|
|
|
thread
|
|
|
|
timer
|
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB SRC_AUTODOCK_VINA_LIBS
|
|
|
|
"src/lib/*.cpp"
|
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB SRC_AUTODOCK_VINA_SPLIT
|
|
|
|
"src/split/*.cpp"
|
|
|
|
)
|
|
|
|
|
|
|
|
file(GLOB HEADERS
|
|
|
|
"src/lib/*.h"
|
|
|
|
)
|
|
|
|
|
|
|
|
add_library(vina ${SRC_AUTODOCK_VINA_LIBS})
|
|
|
|
add_library(vina_split ${SRC_AUTODOCK_VINA_SPLIT})
|
|
|
|
|
2021-11-16 01:32:46 +01:00
|
|
|
target_include_directories(vina
|
|
|
|
PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/lib/>
|
2021-09-03 03:56:47 +03:00
|
|
|
$<INSTALL_INTERFACE:include>
|
2021-11-16 01:32:46 +01:00
|
|
|
PRIVATE
|
2021-09-03 03:56:47 +03:00
|
|
|
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
|
|
|
)
|
|
|
|
|
2021-11-16 01:32:46 +01:00
|
|
|
target_include_directories(vina_split
|
|
|
|
PUBLIC
|
|
|
|
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/lib/>
|
2021-09-03 03:56:47 +03:00
|
|
|
$<INSTALL_INTERFACE:include>
|
2021-11-16 01:32:46 +01:00
|
|
|
PRIVATE
|
|
|
|
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
|
2021-09-03 03:56:47 +03:00
|
|
|
)
|
|
|
|
|
2021-11-16 01:32:46 +01:00
|
|
|
target_compile_definitions(vina
|
|
|
|
PUBLIC
|
2021-09-03 03:56:47 +03:00
|
|
|
-DVERSION=\"${GIT_VERSION}\"
|
|
|
|
)
|
|
|
|
|
2021-11-16 01:32:46 +01:00
|
|
|
target_compile_definitions(vina_split
|
|
|
|
PUBLIC
|
2021-09-03 03:56:47 +03:00
|
|
|
-DVERSION=\"${GIT_VERSION}\"
|
|
|
|
)
|
|
|
|
|
2021-11-16 01:32:46 +01:00
|
|
|
target_link_libraries(vina
|
|
|
|
PRIVATE
|
2021-09-03 03:56:47 +03:00
|
|
|
Boost::boost
|
|
|
|
Boost::filesystem
|
|
|
|
Boost::log
|
|
|
|
Boost::program_options
|
|
|
|
Boost::random
|
|
|
|
Boost::serialization
|
|
|
|
Boost::thread
|
|
|
|
Boost::timer
|
|
|
|
)
|
|
|
|
|
2021-11-16 01:32:46 +01:00
|
|
|
target_link_libraries(vina_split
|
|
|
|
PRIVATE
|
2021-09-03 03:56:47 +03:00
|
|
|
Boost::boost
|
|
|
|
Boost::filesystem
|
|
|
|
Boost::log
|
|
|
|
Boost::program_options
|
|
|
|
Boost::random
|
|
|
|
Boost::serialization
|
|
|
|
Boost::thread
|
|
|
|
Boost::timer
|
|
|
|
)
|
|
|
|
|
|
|
|
install(TARGETS vina EXPORT autodock-vina-config
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
ARCHIVE DESTINATION lib
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
)
|
|
|
|
|
|
|
|
install(TARGETS vina_split EXPORT autodock-vina-config
|
|
|
|
RUNTIME DESTINATION bin
|
|
|
|
ARCHIVE DESTINATION lib
|
|
|
|
LIBRARY DESTINATION lib
|
|
|
|
)
|
|
|
|
|
|
|
|
install(FILES ${HEADERS} DESTINATION include/autodock-vina)
|
|
|
|
install(EXPORT autodock-vina-config NAMESPACE autodock-vina::autodock-vina:: DESTINATION share/autodock-vina)
|