diff options
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindDoxygen.cmake | 42 | ||||
-rw-r--r-- | Modules/FindHTMLHelp.cmake | 28 | ||||
-rw-r--r-- | Modules/Platform/Generic-SDCC-C.cmake | 2 |
3 files changed, 40 insertions, 32 deletions
diff --git a/Modules/FindDoxygen.cmake b/Modules/FindDoxygen.cmake index 76456a0..0d9e161 100644 --- a/Modules/FindDoxygen.cmake +++ b/Modules/FindDoxygen.cmake @@ -396,10 +396,12 @@ macro(_Doxygen_find_doxygen) endif() # Create an imported target for Doxygen - add_executable(Doxygen::doxygen IMPORTED GLOBAL) - set_target_properties(Doxygen::doxygen PROPERTIES - IMPORTED_LOCATION "${DOXYGEN_EXECUTABLE}" - ) + if(NOT TARGET Doxygen::doxygen) + add_executable(Doxygen::doxygen IMPORTED GLOBAL) + set_target_properties(Doxygen::doxygen PROPERTIES + IMPORTED_LOCATION "${DOXYGEN_EXECUTABLE}" + ) + endif() endif() endmacro() @@ -429,10 +431,12 @@ macro(_Doxygen_find_dia) endif() # Create an imported target for component - add_executable(Doxygen::dia IMPORTED GLOBAL) - set_target_properties(Doxygen::dia PROPERTIES - IMPORTED_LOCATION "${DOXYGEN_DIA_EXECUTABLE}" - ) + if(NOT TARGET Doxygen::dia) + add_executable(Doxygen::dia IMPORTED GLOBAL) + set_target_properties(Doxygen::dia PROPERTIES + IMPORTED_LOCATION "${DOXYGEN_DIA_EXECUTABLE}" + ) + endif() endif() unset(_x86) @@ -474,10 +478,12 @@ macro(_Doxygen_find_dot) endif() # Create an imported target for component - add_executable(Doxygen::dot IMPORTED GLOBAL) - set_target_properties(Doxygen::dot PROPERTIES - IMPORTED_LOCATION "${DOXYGEN_DOT_EXECUTABLE}" - ) + if(NOT TARGET Doxygen::dot) + add_executable(Doxygen::dot IMPORTED GLOBAL) + set_target_properties(Doxygen::dot PROPERTIES + IMPORTED_LOCATION "${DOXYGEN_DOT_EXECUTABLE}" + ) + endif() endif() unset(_Doxygen_GRAPHVIZ_BIN_DIRS) @@ -510,10 +516,12 @@ macro(_Doxygen_find_mscgen) endif() # Create an imported target for component - add_executable(Doxygen::mscgen IMPORTED GLOBAL) - set_target_properties(Doxygen::mscgen PROPERTIES - IMPORTED_LOCATION "${DOXYGEN_MSCGEN_EXECUTABLE}" - ) + if(NOT TARGET Doxygen::mscgen) + add_executable(Doxygen::mscgen IMPORTED GLOBAL) + set_target_properties(Doxygen::mscgen PROPERTIES + IMPORTED_LOCATION "${DOXYGEN_MSCGEN_EXECUTABLE}" + ) + endif() endif() unset(_x86) @@ -586,7 +594,7 @@ else() set(DOXYGEN_FOUND "NO") endif() if(_Doxygen_keep_backward_compat) - if(DOXYGEN_DOT_FOUND) + if(Doxygen_dot_FOUND) set(DOXYGEN_DOT_FOUND "YES") else() set(DOXYGEN_DOT_FOUND "NO") diff --git a/Modules/FindHTMLHelp.cmake b/Modules/FindHTMLHelp.cmake index 84e2458..6aab8a7 100644 --- a/Modules/FindHTMLHelp.cmake +++ b/Modules/FindHTMLHelp.cmake @@ -18,28 +18,28 @@ if(WIN32) find_program(HTML_HELP_COMPILER - hhc - "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]" - "$ENV{ProgramFiles}/HTML Help Workshop" - "C:/Program Files/HTML Help Workshop" + NAMES hhc + PATHS + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]" + PATH_SUFFIXES "HTML Help Workshop" ) get_filename_component(HTML_HELP_COMPILER_PATH "${HTML_HELP_COMPILER}" PATH) find_path(HTML_HELP_INCLUDE_PATH - htmlhelp.h - "${HTML_HELP_COMPILER_PATH}/include" - "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/include" - "$ENV{ProgramFiles}/HTML Help Workshop/include" - "C:/Program Files/HTML Help Workshop/include" + NAMES htmlhelp.h + PATHS + "${HTML_HELP_COMPILER_PATH}/include" + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/include" + PATH_SUFFIXES "HTML Help Workshop/include" ) find_library(HTML_HELP_LIBRARY - htmlhelp - "${HTML_HELP_COMPILER_PATH}/lib" - "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/lib" - "$ENV{ProgramFiles}/HTML Help Workshop/lib" - "C:/Program Files/HTML Help Workshop/lib" + NAMES htmlhelp + PATHS + "${HTML_HELP_COMPILER_PATH}/lib" + "[HKEY_CURRENT_USER\\Software\\Microsoft\\HTML Help Workshop;InstallDir]/lib" + PATH_SUFFIXES "HTML Help Workshop/lib" ) mark_as_advanced( diff --git a/Modules/Platform/Generic-SDCC-C.cmake b/Modules/Platform/Generic-SDCC-C.cmake index bbefe19..4b3912a 100644 --- a/Modules/Platform/Generic-SDCC-C.cmake +++ b/Modules/Platform/Generic-SDCC-C.cmake @@ -41,7 +41,7 @@ endif() set(CMAKE_C_COMPILE_OBJECT "<CMAKE_C_COMPILER> <DEFINES> <INCLUDES> <FLAGS> -o <OBJECT> -c <SOURCE>") # link object files to an executable -set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <OBJECTS> --out-fmt-ihx -o <TARGET> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>") +set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <OBJECTS> -o <TARGET> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <LINK_LIBRARIES>") # needs sdcc 2.7.0 + sddclib from cvs set(CMAKE_C_CREATE_STATIC_LIBRARY |