Permalink
Browse files

Check for empty *_SOURCE_DIR variables for CMP, SIMPL and SIMPLView. …

…Add target dependencies for

the discount generated documentation to ensure any needed DLL libraries are copied into the build directory
before trying to launch the custom build target.
  • Loading branch information...
imikejackson committed Jan 11, 2018
1 parent b99c387 commit ebc8cdbe156b0fd48c9594efe7b798eabf420f21
Showing with 12 additions and 6 deletions.
  1. +8 −0 CMakeLists.txt
  2. +4 −6 Documentation/ReferenceManual/CMakeLists.txt
View
@@ -108,6 +108,8 @@ if("${CMP_SOURCE_DIR}" STREQUAL "")
set(CMP_SOURCE_DIR "${DREAM3DProj_SOURCE_DIR}/ExternalProjects/CMP")
elseif(EXISTS "${DREAM3D_PARENT}/CMP")
set(CMP_SOURCE_DIR ${DREAM3D_PARENT}/CMP)
else()
message(FATAL_ERROR "CMP_SOURCE_DIR was not set. Where is the CMP project directory. Please set the CMP_SOURCE_DIR variable to the CMP directory.")
endif()
message(STATUS "CMP_SOURCE_DIR: ${CMP_SOURCE_DIR}")
endif()
@@ -120,6 +122,8 @@ if("${SIMPLProj_SOURCE_DIR}" STREQUAL "")
set(SIMPLProj_SOURCE_DIR "${DREAM3DProj_SOURCE_DIR}/ExternalProjects/SIMPL")
elseif(EXISTS "${DREAM3D_PARENT}/SIMPL")
set(SIMPLProj_SOURCE_DIR ${DREAM3D_PARENT}/SIMPL)
else()
message(FATAL_ERROR "SIMPLProj_SOURCE_DIR was not set. Where is the CMP project directory. Please set the SIMPLProj_SOURCE_DIR variable to the CMP directory.")
endif()
message(STATUS "SIMPLProj_SOURCE_DIR: ${SIMPLProj_SOURCE_DIR}")
endif()
@@ -133,10 +137,14 @@ if("${SIMPLViewProj_SOURCE_DIR}" STREQUAL "")
set(SIMPLViewProj_SOURCE_DIR "${DREAM3DProj_SOURCE_DIR}/ExternalProjects/SIMPLView")
elseif(EXISTS "${DREAM3D_PARENT}/SIMPLView")
set(SIMPLViewProj_SOURCE_DIR "${DREAM3D_PARENT}/SIMPLView")
else()
message(FATAL_ERROR "SIMPLViewProj_SOURCE_DIR was not set. Where is the CMP project directory. Please set the SIMPLViewProj_SOURCE_DIR variable to the CMP directory.")
endif()
message(STATUS "SIMPLViewProj_SOURCE_DIR: ${SIMPLViewProj_SOURCE_DIR}")
endif()
set_property(GLOBAL PROPERTY COPY_LIBRARY_TARGETS "")
#------------------------------------------------------------------------------
# There are several different Release Types that we are going to use.
# Official: This is an official release from BlueQuartz Software
@@ -192,15 +192,12 @@ if(SIMPL_DISCOUNT_DOCUMENTATION)
endif()
if(APPLE)
set(HTML_OUTPUT_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${DREAM3D_PACKAGE_DEST_PREFIX}Resources/Help/DREAM3D")
else()
set(HTML_OUTPUT_DIR "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/Help/DREAM3D")
endif()
configure_file( ${DREAM3DProj_SOURCE_DIR}/Documentation/Tools/ToolConfiguration.h.in
${DREAM3DProj_BINARY_DIR}/Documentation/ReferenceManual/DocToolsConfiguration.h)
@@ -209,7 +206,7 @@ if(SIMPL_DISCOUNT_DOCUMENTATION)
${DREAM3DProj_SOURCE_DIR}/Documentation/Tools/GenerateHTMLDocs.cpp
${DREAM3DProj_BINARY_DIR}/Documentation/ReferenceManual/DocToolsConfiguration.h
)
target_include_directories(GenerateHTMLDocs INTERFACE discount::libmarkdown)
target_include_directories(GenerateHTMLDocs INTERFACE discount::libmarkdown)
target_link_libraries(GenerateHTMLDocs Qt5::Core discount::libmarkdown SIMPLib)
#-- Set the Debug Suffix for the application
set_target_properties( GenerateHTMLDocs
@@ -218,11 +215,12 @@ if(SIMPL_DISCOUNT_DOCUMENTATION)
RELEASE_OUTPUT_NAME GenerateHTMLDocs
)
get_property(COPY_LIBRARY_TARGETS GLOBAL PROPERTY COPY_LIBRARY_TARGETS)
add_custom_target(GenerateDiscountDocs ALL
COMMAND GenerateHTMLDocs
DEPENDS DREAM3D
DEPENDS ${COPY_LIBRARY_TARGETS} DREAM3D
COMMENT "Using Discount to generate HTML Documentation"
)
)
else()
set(SIMPL_DISCOUNT_DOCUMENTATION OFF)

0 comments on commit ebc8cdb

Please sign in to comment.