@@ -55,25 +55,21 @@ endif()
55
55
add_subdirectory (lib)
56
56
include_directories (lib)
57
57
58
- # link cslib.a and boost libraries
59
- link_libraries (cs
60
- ${Boost_FILESYSTEM_LIBRARY}
61
- ${Boost_PROGRAM_OPTIONS_LIBRARY}
62
- ${Boost_REGEX_LIBRARY} )
63
-
64
58
# the list of executables
65
59
add_executable (csdiff csdiff.cc)
66
60
add_executable (csgrep csgrep.cc)
67
61
add_executable (cshtml cshtml.cc)
68
62
add_executable (cslinker cslinker.cc)
69
63
add_executable (cssort cssort.cc)
70
- target_link_libraries (cshtml
71
- ${Boost_SYSTEM_LIBRARY} )
72
-
73
- # experimental
74
64
add_executable (cstrans-df-run cstrans-df-run.cc)
75
- target_link_libraries (cstrans-df-run
76
- ${Boost_SYSTEM_LIBRARY} )
65
+
66
+ # link cslib.a and boost libraries
67
+ foreach (tgt csdiff csgrep cshtml cslinker cssort cstrans-df-run)
68
+ target_link_libraries (${tgt} cs
69
+ ${Boost_FILESYSTEM_LIBRARY}
70
+ ${Boost_PROGRAM_OPTIONS_LIBRARY}
71
+ ${Boost_REGEX_LIBRARY} )
72
+ endforeach ()
77
73
78
74
# declare what 'make install' should install
79
75
include (GNUInstallDirs)
@@ -111,7 +107,10 @@ macro(build_pycsdiff version)
111
107
112
108
add_library (pycsdiff_py${version} MODULE pycsdiff.cc)
113
109
target_link_libraries (pycsdiff_py${version}
114
- PRIVATE ${Boost_PYTHON${PYTHON_VERSION_SUFFIX} _LIBRARY}
110
+ PRIVATE cs
111
+ ${Boost_FILESYSTEM_LIBRARY}
112
+ ${Boost_REGEX_LIBRARY}
113
+ ${Boost_PYTHON${PYTHON_VERSION_SUFFIX} _LIBRARY}
115
114
Python${version} ::Module)
116
115
117
116
# set correct name so that `python -c 'import pycsdiff' works`
0 commit comments