File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -4,14 +4,13 @@ project(cpp-ipc)
4
4
option (LIBIPC_BUILD_TESTS "Build all of libipc's own tests." OFF )
5
5
option (LIBIPC_BUILD_DEMOS "Build all of libipc's own demos." OFF )
6
6
7
+ set (CMAKE_POSITION_INDEPENDENT_CODE ON )
7
8
set (CMAKE_CXX_STANDARD 17 )
8
9
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -DNDEBUG" )
9
10
if (NOT MSVC )
10
11
set (CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -O2" )
11
12
endif ()
12
13
13
- include_directories (${CMAKE_SOURCE_DIR} /include )
14
-
15
14
set (LIBRARY_OUTPUT_PATH ${CMAKE_BINARY_DIR} /bin )
16
15
set (EXECUTABLE_OUTPUT_PATH ${CMAKE_BINARY_DIR} /bin )
17
16
set (LIBIPC_PROJECT_DIR ${PROJECT_SOURCE_DIR} )
Original file line number Diff line number Diff line change @@ -2,14 +2,6 @@ project(ipc)
2
2
3
3
option (LIBIPC_BUILD_SHARED_LIBS "Build shared libraries (DLLs)." OFF )
4
4
5
- if (NOT MSVC )
6
- add_compile_options (-fPIC )
7
- endif ()
8
-
9
- include_directories (
10
- ${LIBIPC_PROJECT_DIR} /include
11
- ${LIBIPC_PROJECT_DIR} /src )
12
-
13
5
if (UNIX )
14
6
file (GLOB SRC_FILES ${LIBIPC_PROJECT_DIR} /src/libipc/platform/*_linux.cpp )
15
7
else ()
@@ -37,6 +29,11 @@ else()
37
29
add_library (${PROJECT_NAME} STATIC ${SRC_FILES} ${HEAD_FILES} )
38
30
endif ()
39
31
32
+ target_include_directories (${PROJECT_NAME}
33
+ PUBLIC ${LIBIPC_PROJECT_DIR} /include
34
+ PRIVATE ${LIBIPC_PROJECT_DIR} /src
35
+ )
36
+
40
37
if (NOT MSVC )
41
38
target_link_libraries (${PROJECT_NAME} PUBLIC
42
39
pthread
You can’t perform that action at this time.
0 commit comments