mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-10 13:04:15 -04:00
CMakeFile formatting
This commit is contained in:
parent
a0364e98be
commit
4eb17c6658
@ -42,19 +42,23 @@ set(DWARFS_VERSION
|
|||||||
list(APPEND DWARFS_BOOST_MODULES date_time filesystem program_options system)
|
list(APPEND DWARFS_BOOST_MODULES date_time filesystem program_options system)
|
||||||
|
|
||||||
if(WITH_PYTHON)
|
if(WITH_PYTHON)
|
||||||
# TODO: would be nicer to be able to support a range of python versions
|
# TODO: would be nicer to be able to support a range of python versions
|
||||||
find_package(Python3 ${WITH_PYTHON_VERSION} EXACT REQUIRED COMPONENTS Development)
|
find_package(Python3 ${WITH_PYTHON_VERSION} EXACT REQUIRED
|
||||||
list(APPEND DWARFS_BOOST_MODULES
|
COMPONENTS Development)
|
||||||
"python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
|
list(APPEND DWARFS_BOOST_MODULES
|
||||||
message(STATUS "Enabling support for Python ${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}")
|
"python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
|
||||||
|
message(
|
||||||
|
STATUS
|
||||||
|
"Enabling support for Python ${Python3_VERSION_MAJOR}.${Python3_VERSION_MINOR}"
|
||||||
|
)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(Boost 1.67 REQUIRED COMPONENTS ${DWARFS_BOOST_MODULES})
|
find_package(Boost 1.67 REQUIRED COMPONENTS ${DWARFS_BOOST_MODULES})
|
||||||
|
|
||||||
if(WITH_PYTHON)
|
if(WITH_PYTHON)
|
||||||
set(BOOST_PYTHON_LIBS ${Boost_LIBRARIES})
|
set(BOOST_PYTHON_LIBS ${Boost_LIBRARIES})
|
||||||
list(FILTER Boost_LIBRARIES EXCLUDE REGEX python)
|
list(FILTER Boost_LIBRARIES EXCLUDE REGEX python)
|
||||||
list(FILTER BOOST_PYTHON_LIBS INCLUDE REGEX python)
|
list(FILTER BOOST_PYTHON_LIBS INCLUDE REGEX python)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
@ -159,8 +163,8 @@ if(WITH_TESTS)
|
|||||||
gtest_discover_tests(dwarfs_test)
|
gtest_discover_tests(dwarfs_test)
|
||||||
gtest_discover_tests(dwarfs_compat_test)
|
gtest_discover_tests(dwarfs_compat_test)
|
||||||
|
|
||||||
target_compile_definitions(dwarfs_compat_test PRIVATE
|
target_compile_definitions(dwarfs_compat_test
|
||||||
TEST_DATA_DIR=\"${CMAKE_SOURCE_DIR}/test\")
|
PRIVATE TEST_DATA_DIR=\"${CMAKE_SOURCE_DIR}/test\")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
foreach(man dwarfs mkdwarfs)
|
foreach(man dwarfs mkdwarfs)
|
||||||
@ -277,8 +281,9 @@ target_include_directories(metadata_thrift PRIVATE ${INCLUDE_DIRS})
|
|||||||
add_dependencies(metadata_thrift thrift_light)
|
add_dependencies(metadata_thrift thrift_light)
|
||||||
|
|
||||||
foreach(tgt dwarfs ${BINARY_TARGETS})
|
foreach(tgt dwarfs ${BINARY_TARGETS})
|
||||||
target_include_directories(${tgt} SYSTEM PRIVATE ${Boost_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}
|
target_include_directories(
|
||||||
${INCLUDE_DIRS})
|
${tgt} SYSTEM PRIVATE ${Boost_INCLUDE_DIRS} ${Python3_INCLUDE_DIRS}
|
||||||
|
${INCLUDE_DIRS})
|
||||||
|
|
||||||
target_include_directories(${tgt} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
target_include_directories(${tgt} PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user