diff --git a/CMakeLists.txt b/CMakeLists.txt index 852065729..f35890d8d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -31,6 +31,10 @@ endif() # generate a compile commands file as complete database for vim-YouCompleteMe or some other similar tools set(CMAKE_EXPORT_COMPILE_COMMANDS ON) +# Install settings +if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) + set(CMAKE_INSTALL_PREFIX /usr) +endif () include(GNUInstallDirs) if (NOT (${CMAKE_BUILD_TYPE} MATCHES "Debug")) @@ -130,11 +134,6 @@ add_subdirectory("frame") add_subdirectory("plugins") #add_subdirectory("tests") -# Install settings -if (CMAKE_INSTALL_PREFIX_INITIALIZED_TO_DEFAULT) - set(CMAKE_INSTALL_PREFIX /usr) -endif () - ## qm files file(GLOB QM_FILES "translations/*.qm") install(FILES ${QM_FILES} diff --git a/plugins/plugin-guide/home_monitor/CMakeLists.txt b/plugins/plugin-guide/home_monitor/CMakeLists.txt index f5811e09d..065f61d94 100644 --- a/plugins/plugin-guide/home_monitor/CMakeLists.txt +++ b/plugins/plugin-guide/home_monitor/CMakeLists.txt @@ -94,8 +94,5 @@ target_link_libraries(${PLUGIN_NAME} PRIVATE ${DdeDockInterface_LIBRARIES} ) -# 设置安装路径的前缀(默认为"/usr/local") -set(CMAKE_INSTALL_PREFIX "/usr") - # 设置执行 make install 时哪个目标应该被 install 到哪个位置 install(TARGETS ${PLUGIN_NAME} LIBRARY DESTINATION lib/dde-dock/plugins)