diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a6a4761829c184915ffb4986cee2f2e54d91c22..fcbfd11f48b1b221adc337603350ec6b8faf307a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,7 +33,8 @@ include_directories(src/smart_grid) # Add OPC UA -if(BUILD_OPC_UA_FOR_INSTALL) +option(BUILD_OPC_UA "Build OPC UA library" OFF) +if(BUILD_OPC_UA) macro(SET_OPTION option value) set(${option} ${value} CACHE "" INTERNAL FORCE) endmacro() @@ -46,11 +47,11 @@ if(BUILD_OPC_UA_FOR_INSTALL) option(BUILD_TESTING "Build and run tests" OFF) option(BUILD_SHARED_LIBS "Build shared libraries." ON) add_subdirectory(libs/freeopcua) -endif(BUILD_OPC_UA_FOR_INSTALL) +endif(BUILD_OPC_UA) -add_executable(opc_server.exe src/apps/SmgOPC_server/opc_server.cpp) -target_include_directories(opc_server.exe PUBLIC libs/freeopcua/include) -target_link_libraries(opc_server.exe opcuacore opcuaserver) +# add_executable(opc_server.exe src/apps/SmgOPC_server/opc_server.cpp) +# target_include_directories(opc_server.exe PUBLIC libs/freeopcua/include) +# target_link_libraries(opc_server.exe opcuacore opcuaserver) add_executable(smart_grid.exe