-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
56 lines (49 loc) · 1.26 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
cmake_minimum_required (VERSION 3.14)
project (photon-libtcmu CXX)
set(VERSION 1.6.0)
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/CMake")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fpic -fpermissive -Wall -Werror=sign-compare")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpic -fpermissive -Wall -Werror=sign-compare")
set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_STANDARD_REQUIRED on)
find_package(nl REQUIRED)
find_package(photon REQUIRED)
# Stuff for building the shared library
# add_library(tcmu SHARED
# configfs.cpp
# api.cpp
# libtcmu.cpp
# scsi.cpp
# )
# set_target_properties(tcmu
# PROPERTIES
# VERSION 2.2
# SOVERSION "2"
# )
# target_include_directories(tcmu
# PUBLIC ${LIBNL_INCLUDE_DIR}
# PUBLIC ${PHOTON_INCLUDE_DIR}
# )
# target_link_libraries(tcmu
# ${LIBNL_LIB}
# ${LIBNL_GENL_LIB}
# photon
# )
#install(TARGETS tcmu LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
# Stuff for building the static library
add_library(tcmu_static
configfs.cpp
api.cpp
libtcmu.cpp
scsi.cpp
)
set_target_properties(tcmu_static PROPERTIES OUTPUT_NAME tcmu)
target_include_directories(tcmu_static
PUBLIC ${LIBNL_INCLUDE_DIR}
PUBLIC ${PHOTON_INCLUDE_DIR}
)
target_link_libraries(tcmu_static
${LIBNL_LIB}
${LIBNL_GENL_LIB}
photon_static
)