Browse Source

Explicitly set default value for CTK_INSTALL_QTPLUGIN_DIR

See #403
Jean-Christophe Fillion-Robin 11 years ago
parent
commit
2dcffeedb7
3 changed files with 4 additions and 9 deletions
  1. 0 3
      CMake/ctkMacroBuildQtPlugin.cmake
  2. 3 0
      CMakeLists.txt
  3. 1 6
      SuperBuild.cmake

+ 0 - 3
CMake/ctkMacroBuildQtPlugin.cmake

@@ -127,9 +127,6 @@ macro(ctkMacroBuildQtPlugin)
   # CTK_INSTALL_QTPLUGIN_DIR:STRING can be passed when configuring CTK
   # By default, it is the same path as CTK_INSTALL_LIB_DIR
   # Plugins are installed in a subdirectory corresponding to their types (e.g. designer, iconengines, imageformats...)
-  if(NOT DEFINED CTK_INSTALL_QTPLUGIN_DIR)
-    set(CTK_INSTALL_QTPLUGIN_DIR "${CTK_INSTALL_LIB_DIR}")
-  endif()
   install(TARGETS ${lib_name}
     RUNTIME DESTINATION ${CTK_INSTALL_QTPLUGIN_DIR}/${MY_PLUGIN_DIR} COMPONENT RuntimePlugins
     LIBRARY DESTINATION ${CTK_INSTALL_QTPLUGIN_DIR}/${MY_PLUGIN_DIR} COMPONENT RuntimePlugins

+ 3 - 0
CMakeLists.txt

@@ -154,6 +154,9 @@ endif()
 if(NOT CTK_INSTALL_PLUGIN_INCLUDE_DIR)
   set(CTK_INSTALL_PLUGIN_INCLUDE_DIR ${CTK_INSTALL_INCLUDE_DIR})
 endif()
+if(NOT CTK_INSTALL_QTPLUGIN_DIR)
+  set(CTK_INSTALL_QTPLUGIN_DIR ${CTK_INSTALL_LIB_DIR})
+endif()
 if(NOT CTK_INSTALL_DOC_DIR)
   set(CTK_INSTALL_DOC_DIR "doc")
 endif()

+ 1 - 6
SuperBuild.cmake

@@ -137,12 +137,6 @@ endif()
 #
 set(proj CTK-Configure)
 
-if(NOT "${CTK_INSTALL_QTPLUGIN_DIR}" STREQUAL "")
-  list(APPEND CTK_SUPERBUILD_EP_ARGS
-    -DCTK_INSTALL_QTPLUGIN_DIR:STRING=${CTK_INSTALL_QTPLUGIN_DIR}
-    )
-endif()
-
 ExternalProject_Add(${proj}
   DOWNLOAD_COMMAND ""
   CMAKE_GENERATOR ${gen}
@@ -170,6 +164,7 @@ ExternalProject_Add(${proj}
     -DCTK_INSTALL_PLUGIN_DIR:STRING=${CTK_INSTALL_PLUGIN_DIR}
     -DCTK_INSTALL_INCLUDE_DIR:STRING=${CTK_INSTALL_INCLUDE_DIR}
     -DCTK_INSTALL_PLUGIN_INCLUDE_DIR:STRING=${CTK_INSTALL_PLUGIN_INCLUDE_DIR}
+    -DCTK_INSTALL_QTPLUGIN_DIR:STRING=${CTK_INSTALL_QTPLUGIN_DIR}
     -DCTK_INSTALL_DOC_DIR:STRING=${CTK_INSTALL_DOC_DIR}
     -DCTK_EXTERNAL_LIBRARY_DIRS:STRING=${CTK_EXTERNAL_LIBRARY_DIRS}
     -DQT_QMAKE_EXECUTABLE:FILEPATH=${QT_QMAKE_EXECUTABLE}