mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-26 22:17:41 +00:00
Use cmake macro find_package_handle_standard_args()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@29416 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
0a7e0329af
commit
a8169a0139
@ -5,15 +5,15 @@
|
||||
|
||||
set(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS true)
|
||||
|
||||
if (AIKSAURUS_INCLUDE_DIR)
|
||||
if (AIKSAURUSLIB_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set(AIKSAURUS_FIND_QUIETLY TRUE)
|
||||
set(AIKSAURUSLIB_FIND_QUIETLY TRUE)
|
||||
endif()
|
||||
|
||||
find_path(AIKSAURUS_INCLUDE_DIR NAMES Aiksaurus.h
|
||||
find_path(AIKSAURUSLIB_INCLUDE_DIR NAMES Aiksaurus.h
|
||||
PATH_SUFFIXES "" "Aiksaurus")
|
||||
if(AIKSAURUS_INCLUDE_DIR)
|
||||
if(AIKSAURUS_INCLUDE_DIR MATCHES "Aiksaurus")
|
||||
if(AIKSAURUSLIB_INCLUDE_DIR)
|
||||
if(AIKSAURUSLIB_INCLUDE_DIR MATCHES "Aiksaurus")
|
||||
set(AIKSAURUS_H Aiksaurus/Aiksaurus.h)
|
||||
else()
|
||||
set(AIKSAURUS_H Aiksaurus.h)
|
||||
@ -26,19 +26,9 @@ find_library(AIKSAURUSLIB_LIBRARY NAMES ${POTENTIAL_AIKSAURUS_LIBS}
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib)
|
||||
|
||||
if(AIKSAURUS_INCLUDE_DIR AND AIKSAURUSLIB_LIBRARY)
|
||||
set(AIKSAURUSLIB_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(AIKSAURUSLIB_FOUND)
|
||||
if(NOT AIKSAURUS_FIND_QUIETLY)
|
||||
message(STATUS "Found AIKSAURUS: ${AIKSAURUSLIB_LIBRARY}")
|
||||
endif()
|
||||
else()
|
||||
if(AIKSAURUS_FIND_REQUIRED)
|
||||
message(STATUS "Looked for AIKSAURUS libraries named ${POTENTIAL_AIKSAURUS_LIBS}.")
|
||||
message(STATUS "Found no acceptable AIKSAURUS library. This is fatal.")
|
||||
endif()
|
||||
endif()
|
||||
# handle the QUIETLY and REQUIRED arguments and set AIKSAURUSLIB_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(AIKSAURUSLIB DEFAULT_MSG AIKSAURUSLIB_LIBRARY AIKSAURUSLIB_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(AIKSAURUSLIB_LIBRARY AIKSAURUSLIB_INCLUDE_DIR)
|
||||
|
@ -21,19 +21,9 @@ find_library(MYTHESLIB_LIBRARY NAMES ${POTENTIAL_MYTHES_LIBS}
|
||||
PATHS
|
||||
/usr/lib /usr/local/lib)
|
||||
|
||||
if(MYTHESLIB_INCLUDE_DIR AND MYTHESLIB_LIBRARY)
|
||||
set(MYTHESLIB_FOUND TRUE)
|
||||
endif()
|
||||
|
||||
if(MYTHESLIB_FOUND)
|
||||
if(NOT MYTHESLIB_FIND_QUIETLY)
|
||||
message(STATUS "Found MYTHES: ${MYTHESLIB_LIBRARY}")
|
||||
endif()
|
||||
else()
|
||||
if(MYTHESLIB_FIND_REQUIRED)
|
||||
message(STATUS "Looked for MYTHES libraries named ${POTENTIAL_MYTHES_LIBS}.")
|
||||
message(STATUS "Found no acceptable MYTHES library. This is fatal.")
|
||||
endif()
|
||||
endif()
|
||||
# handle the QUIETLY and REQUIRED arguments and set MYTHESLIB_FOUND to TRUE if
|
||||
# all listed variables are TRUE
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(MYTHESLIB DEFAULT_MSG MYTHESLIB_LIBRARY MYTHESLIB_INCLUDE_DIR)
|
||||
|
||||
mark_as_advanced(MYTHESLIB_LIBRARY MYTHESLIB_INCLUDE_DIR)
|
||||
|
Loading…
Reference in New Issue
Block a user