build: do not set haskell targets when haskell is not build
@@ -215,29 +215,6 @@ macro (add_haskell_plugin target)
"${GHC_GMP_PATH}"
"${CMAKE_INSTALL_RPATH}"
"${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/elektra/haskell")
- else (GHC_PRIM_LIB)
- remove_plugin (${target} "GHC_PRIM_LIB not found")
- endif (GHC_PRIM_LIB)
- else (GHC_GMP_LIB)
- remove_plugin (${target} "GHC_GMP_LIB not found")
- endif (GHC_GMP_LIB)
- else (GHC_BASE_LIB)
- remove_plugin (${target} "GHC_BASE_LIB not found")
- endif (GHC_BASE_LIB)
- else (GHC_RTS_LIB)
- remove_plugin (${target} "GHC_RTS_LIB not found")
- endif (GHC_RTS_LIB)
-
- else (HAVE_HASKELL_BINDING)
- remove_plugin (${target} "haskell bindings are not included in the cmake configuration")
- endif (HAVE_HASKELL_BINDING)
- else (HASKELL_FOUND)
- remove_plugin (${target} ${HASKELL_NOTFOUND_INFO})
- endif (HASKELL_FOUND)
- else (PLUGINPROCESS_FOUND)
- remove_plugin (${target} "${PLUGINPROCESS_NOTFOUND_INFO}, but required for haskell plugins")
- endif (PLUGINPROCESS_FOUND)
- endif (DEPENDENCY_PHASE)
set (PLUGIN_ARGS "")
if (ARG_TEST_README)
@@ -256,7 +233,6 @@ macro (add_haskell_plugin target)
list (APPEND PLUGIN_ARGS "TEST_REQUIRED_PLUGINS")
list (APPEND PLUGIN_ARGS "${ARG_TEST_REQUIRED_PLUGINS}")
endif (ARG_TEST_REQUIRED_PLUGINS)
-
endif (ARG_TEST_README)
# compile our c wrapper which takes care of invoking the haskell runtime
@@ -297,6 +273,30 @@ macro (add_haskell_plugin target)
"SANDBOX_PACKAGEDB=${SANDBOX_PACKAGEDB};LD_LIBRARY_PATH=${CMAKE_BINARY_DIR}/lib")
endif (ADDTESTING_PHASE AND TARGET elektra-${target})
+ else (GHC_PRIM_LIB)
+ remove_plugin (${target} "GHC_PRIM_LIB not found")
+ endif (GHC_PRIM_LIB)
+ else (GHC_GMP_LIB)
+ remove_plugin (${target} "GHC_GMP_LIB not found")
+ endif (GHC_GMP_LIB)
+ else (GHC_BASE_LIB)
+ remove_plugin (${target} "GHC_BASE_LIB not found")
+ endif (GHC_BASE_LIB)
+ else (GHC_RTS_LIB)
+ remove_plugin (${target} "GHC_RTS_LIB not found")
+ endif (GHC_RTS_LIB)
+
+ else (HAVE_HASKELL_BINDING)
+ remove_plugin (${target} "haskell bindings are not included in the cmake configuration")
+ endif (HAVE_HASKELL_BINDING)
+ else (HASKELL_FOUND)
+ remove_plugin (${target} ${HASKELL_NOTFOUND_INFO})
+ endif (HASKELL_FOUND)
+ else (PLUGINPROCESS_FOUND)
+ remove_plugin (${target} "${PLUGINPROCESS_NOTFOUND_INFO}, but required for haskell plugins")
+ endif (PLUGINPROCESS_FOUND)
+ endif (DEPENDENCY_PHASE)
+
mark_as_advanced (GHC_FFI_LIB GHC_RTS_LIB GHC_BASE_LIB GHC_GMP_LIB GHC_PRIM_LIB)
endmacro (add_haskell_plugin)
