Hello everyone
I get a missing separator error, when I change PRIVATE to PUBLIC specificator in target_include_directories statement. I have 3 shared libraries and I change the specificator only in one (libutils for example), but the others link the first (liboracle, libpostgres).
So, the liboracle is compiled well, but compilation libpostgres generate this error.
seclibs_postgres/CMakeFiles/seclibs_postgres.dir/flags.make:8: *** missing separator. Stop.
I don’t understand, why?
cmake version 3.21.3
3 short-cut cmakes are below.
libutils:
find_library(Boost_FS boost_filesystem HINTS ${Boost_LIBRARY_DIRS})
add_library(${PROJECT_NAME} SHARED
logger/Logger.cpp
helpers.cpp
strings/CUCS2String.cpp
strings/CUCS2ErrorManager.cpp
socket/CUnixSocket.cpp
socket/SocketConnectorBase.cpp)
target_include_directories(${PROJECT_NAME} PUBLIC
${PROJECT_SOURCE_DIR}
logger
strings
socket
users
${Boost_INCLUDE_DIRS})
target_link_libraries(${PROJECT_NAME} PUBLIC ${Boost_FS})
liboracle:
add_library(${PROJECT_NAME} SHARED
seclibs_oracle.cpp
OracleHelpers.cpp
OracleString.cpp
OracleQueryExecutor.cpp
OracleConnectionManager.cpp)
target_include_directories(${PROJECT_NAME} PRIVATE
${ORACLE_INCLUDE_DIR})
if(LINUX)
target_link_libraries(${PROJECT_NAME} rt utils)
else()
target_link_libraries(${PROJECT_NAME} ${ORACLE_LIBRARIES} utils)
endif()
libpostgres:
add_library(${PROJECT_NAME} SHARED
PostgresConnectionManager.cpp
PostgresHelpers.cpp
seclibs_postgres.cpp
PostgresUserFinder.cpp)
target_include_directories(${PROJECT_NAME} PRIVATE
${PostgreSQL_INCLUDE_DIR})
if(LINUX)
target_link_libraries(${PROJECT_NAME} rt utils)
else()
target_link_libraries(${PROJECT_NAME} rt utils)
endif()