Skip to content

Commit a3ae5aa

Browse files
committed
Changes/alterations to CMakeLists.txt
1. The HEADER_FILES variables is only required for the installation step. 2. The subdirs() function is deprecated and has been replaced with add_subdirectory().
1 parent e33aba7 commit a3ae5aa

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CMakeLists.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ set(CMAKE_CXX_EXTENSIONS OFF)
99
# For CMake < 3.1.
1010
add_compile_options(-std=c++14)
1111

12-
subdirs(test readme-helper)
12+
add_subdirectory(test readme-helper)
1313

1414
include_directories(${sdptransform_SOURCE_DIR}/include)
1515

@@ -20,13 +20,14 @@ set(
2020
src/writer.cpp
2121
)
2222

23+
# Only required for installation step
2324
set(
2425
HEADER_FILES
2526
include/sdptransform.hpp
2627
include/json.hpp
2728
)
2829

29-
add_library(sdptransform STATIC ${SOURCE_FILES} ${HEADER_FILES})
30+
add_library(sdptransform STATIC ${SOURCE_FILES})
3031

3132
install(TARGETS sdptransform DESTINATION lib)
3233
install(FILES ${HEADER_FILES} DESTINATION include/sdptransform)

0 commit comments

Comments
 (0)