mirror of
https://github.com/mutouyun/cpp-ipc.git
synced 2025-12-07 01:06:45 +08:00
cmake
This commit is contained in:
parent
8495547e8d
commit
263f88b090
@ -8,8 +8,7 @@ addons:
|
|||||||
- ubuntu-toolchain-r-test
|
- ubuntu-toolchain-r-test
|
||||||
packages:
|
packages:
|
||||||
- g++-7
|
- g++-7
|
||||||
- qt5-qmake
|
- qtbase5-dev
|
||||||
- libqt5test5
|
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
include:
|
include:
|
||||||
@ -23,7 +22,6 @@ matrix:
|
|||||||
|
|
||||||
before_install:
|
before_install:
|
||||||
- eval "${MATRIX_EVAL}"
|
- eval "${MATRIX_EVAL}"
|
||||||
- find /usr/ -name "Qt5CoreConfig.cmake"
|
|
||||||
- qmake -v
|
- qmake -v
|
||||||
|
|
||||||
script:
|
script:
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
project(ipc)
|
project(ipc)
|
||||||
|
|
||||||
add_compile_definitions(__IPC_LIBRARY__)
|
add_compile_options(-D__IPC_LIBRARY__)
|
||||||
|
|
||||||
include_directories(../../include ../../src)
|
include_directories(../../include ../../src)
|
||||||
|
|
||||||
@ -11,5 +11,5 @@ else()
|
|||||||
endif()
|
endif()
|
||||||
aux_source_directory(../../src DIR_SRCS)
|
aux_source_directory(../../src DIR_SRCS)
|
||||||
|
|
||||||
add_library(ipc SHARED ${DIR_SRCS})
|
add_library(${PROJECT_NAME} SHARED ${DIR_SRCS})
|
||||||
set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../output)
|
set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/../output)
|
||||||
@ -1,8 +1,7 @@
|
|||||||
project(test)
|
project(test-ipc)
|
||||||
|
|
||||||
set(CMAKE_AUTOMOC ON)
|
set(CMAKE_AUTOMOC ON)
|
||||||
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
set(CMAKE_INCLUDE_CURRENT_DIR ON)
|
||||||
set(CMAKE_PREFIX_PATH /usr/include/qt5)
|
|
||||||
|
|
||||||
find_package(Qt5 COMPONENTS Core Test REQUIRED)
|
find_package(Qt5 COMPONENTS Core Test REQUIRED)
|
||||||
|
|
||||||
@ -20,3 +19,6 @@ add_subdirectory(../ipc ipc.out)
|
|||||||
|
|
||||||
add_executable(${PROJECT_NAME} ${SRC_FILES} ${HEAD_FILES})
|
add_executable(${PROJECT_NAME} ${SRC_FILES} ${HEAD_FILES})
|
||||||
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Test ipc)
|
target_link_libraries(${PROJECT_NAME} Qt5::Core Qt5::Test ipc)
|
||||||
|
if(NOT MSVC)
|
||||||
|
target_link_libraries(${PROJECT_NAME} pthread rt)
|
||||||
|
endif()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user