mirror of
https://github.com/open62541/open62541.git
synced 2026-10-19 06:21:12 +08:00
trying to make CMake simpler, by removing additional dependencies
This commit is contained in:
@@ -354,7 +354,6 @@ add_custom_command(OUTPUT ${PROJECT_BINARY_DIR}/open62541.c
|
||||
|
||||
# build shared library
|
||||
if(UA_ENABLE_AMALGAMATION)
|
||||
add_custom_target(amalgamation ALL DEPENDS ${PROJECT_BINARY_DIR}/open62541.h ${PROJECT_BINARY_DIR}/open62541.c)
|
||||
add_library(open62541-object OBJECT ${PROJECT_BINARY_DIR}/open62541.c ${PROJECT_BINARY_DIR}/open62541.h)
|
||||
include_directories(${PROJECT_BINARY_DIR})
|
||||
else()
|
||||
@@ -380,9 +379,6 @@ if(UA_BUILD_EXAMPLESERVER)
|
||||
set(server_source $<TARGET_OBJECTS:open62541-object>)
|
||||
add_executable(server_static examples/server.c ${server_source})
|
||||
add_executable(server examples/server.c)
|
||||
if(UA_ENABLE_AMALGAMATION)
|
||||
ADD_DEPENDENCIES(server amalgamation)
|
||||
endif()
|
||||
target_link_libraries(server ${open62541_LIBRARIES} open62541)
|
||||
target_link_libraries(server_static ${open62541_LIBRARIES})
|
||||
if(WIN32)
|
||||
@@ -425,10 +421,6 @@ if(UA_BUILD_EXAMPLECLIENT)
|
||||
set(client_source $<TARGET_OBJECTS:open62541-object>)
|
||||
add_executable(client_static examples/client.c ${client_source})
|
||||
add_executable(client examples/client.c)
|
||||
if(UA_ENABLE_AMALGAMATION)
|
||||
ADD_DEPENDENCIES(client_static amalgamation)
|
||||
ADD_DEPENDENCIES(client amalgamation)
|
||||
endif()
|
||||
target_link_libraries(client_static ${open62541_LIBRARIES})
|
||||
target_link_libraries(client open62541 ${open62541_LIBRARIES})
|
||||
if(WIN32)
|
||||
|
||||
Reference in New Issue
Block a user