vcpkg/ports/autodock-vina/CMakeLists.txt

101 lines
2.1 KiB
CMake
Raw Normal View History

2021-09-03 08:56:47 +08:00
cmake_minimum_required(VERSION 3.11)
cmake_policy(VERSION 3.11)
project(autodock-vina)
set(GIT_VERSION v1.2.3)
2021-09-03 08:56:47 +08:00
set(CMAKE_CXX_STANDARD 11)
find_package(Boost REQUIRED COMPONENTS
2021-09-03 08:56:47 +08:00
filesystem
log
math_tr1
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})
target_include_directories(vina
PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/lib/>
2021-09-03 08:56:47 +08:00
$<INSTALL_INTERFACE:include>
PRIVATE
2021-09-03 08:56:47 +08:00
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
)
target_include_directories(vina_split
PUBLIC
$<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/src/lib/>
2021-09-03 08:56:47 +08:00
$<INSTALL_INTERFACE:include>
PRIVATE
$<BUILD_INTERFACE:${Boost_INCLUDE_DIRS}>
2021-09-03 08:56:47 +08:00
)
target_compile_definitions(vina
PUBLIC
2021-09-03 08:56:47 +08:00
-DVERSION=\"${GIT_VERSION}\"
)
target_compile_definitions(vina_split
PUBLIC
2021-09-03 08:56:47 +08:00
-DVERSION=\"${GIT_VERSION}\"
)
target_link_libraries(vina
PRIVATE
2021-09-03 08:56:47 +08:00
Boost::boost
Boost::filesystem
Boost::log
Boost::math_tr1
Boost::program_options
Boost::random
Boost::serialization
Boost::thread
Boost::timer
)
target_link_libraries(vina_split
PRIVATE
2021-09-03 08:56:47 +08:00
Boost::boost
Boost::filesystem
Boost::log
Boost::math_tr1
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)