equal
deleted
inserted
replaced
12 # GNU General Public License for more details. |
12 # GNU General Public License for more details. |
13 # |
13 # |
14 # You should have received a copy of the GNU General Public License |
14 # You should have received a copy of the GNU General Public License |
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
16 |
16 |
17 set(LIBRARY_FILE "relpipe-lib-writer.cpp") |
17 set(LIBRARY_FILE ${PROJECT_CODE}.cpp) |
18 |
18 |
19 # Relpipe libraries: |
19 # Relpipe libraries: |
20 INCLUDE(FindPkgConfig) |
20 INCLUDE(FindPkgConfig) |
21 pkg_check_modules (RELPIPE_LIBS relpipe-lib-protocol.cpp) |
21 pkg_check_modules (RELPIPE_LIBS relpipe-lib-protocol.cpp) |
22 include_directories(${RELPIPE_LIBS_INCLUDE_DIRS}) |
22 include_directories(${RELPIPE_LIBS_INCLUDE_DIRS}) |
25 # Add ASan AddressSanitizer |
25 # Add ASan AddressSanitizer |
26 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") |
26 set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") |
27 set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") |
27 set(CMAKE_LINKER_FLAGS_DEBUG "${CMAKE_LINKER_FLAGS_DEBUG} -fno-omit-frame-pointer -fsanitize=address") |
28 # From ASan wiki: "To get nicer stack traces in error messages add -fno-omit-frame-pointer." |
28 # From ASan wiki: "To get nicer stack traces in error messages add -fno-omit-frame-pointer." |
29 |
29 |
|
30 configure_file("pkg-config.cpp.pc.in" "${PROJECT_CODE}.cpp.pc" @ONLY) |
|
31 |
30 # Library output: |
32 # Library output: |
31 add_library( |
33 add_library( |
32 ${LIBRARY_FILE} SHARED |
34 ${LIBRARY_FILE} SHARED |
33 Factory.cpp |
35 Factory.cpp |
34 ) |
36 ) |
35 |
37 |
|
38 install(TARGETS ${LIBRARY_FILE} DESTINATION lib/relpipe) # TODO: add version and symlink |
|
39 install(FILES "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_CODE}.cpp.pc" DESTINATION ${CMAKE_INSTALL_PREFIX}/lib/pkgconfig/) |
|
40 install(DIRECTORY ../include/ DESTINATION include) |