Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
K
kicad-source-mirror
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
kicad-source-mirror
Commits
2c7eaa60
Commit
2c7eaa60
authored
Apr 13, 2008
by
f3nix
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CMake: add check_find_package_result macro.
parent
945f5f1e
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
22 deletions
+18
-22
CMakeLists.txt
CMakeLists.txt
+6
-18
CheckFindPackageResult.cmake
CMakeModules/CheckFindPackageResult.cmake
+8
-0
FindPackageHandleStandardArgs.cmake
CMakeModules/FindPackageHandleStandardArgs.cmake
+3
-3
CMakeLists.txt
kicad/minizip/CMakeLists.txt
+1
-1
No files found.
CMakeLists.txt
View file @
2c7eaa60
...
@@ -56,33 +56,21 @@ set(KICAD_TEMPLATE ${KICAD_DATA}/template CACHE PATH "Location of KiCad template
...
@@ -56,33 +56,21 @@ set(KICAD_TEMPLATE ${KICAD_DATA}/template CACHE PATH "Location of KiCad template
mark_as_advanced
(
KICAD_BIN KICAD_PLUGINS KICAD_DATA KICAD_DOCS
mark_as_advanced
(
KICAD_BIN KICAD_PLUGINS KICAD_DATA KICAD_DOCS
KICAD_DEMOS KICAD_INTERNAT KICAD_TEMPLATE
)
KICAD_DEMOS KICAD_INTERNAT KICAD_TEMPLATE
)
# Find libraries that are needed to build KiCad.
include
(
CheckFindPackageResult
)
find_package
(
OpenGL
)
find_package
(
OpenGL
)
if
(
OPENGL_FOUND
)
check_find_package_result
(
OPENGL_FOUND
"OpenGL"
)
message
(
STATUS
"Check for installed OpenGL -- found"
)
else
(
OPENGL_FOUND
)
message
(
STATUS
"Check for installed OpenGL -- not found"
)
message
(
FATAL_ERROR
"OpenGL was not found - it is required to build KiCad"
)
endif
(
OPENGL_FOUND
)
find_package
(
Boost
)
find_package
(
Boost
)
if
(
Boost_FOUND
)
check_find_package_result
(
Boost_FOUND
"Boost"
)
message
(
STATUS
"Check for installed Boost -- found"
)
else
(
Boost_FOUND
)
message
(
STATUS
"Check for installed Boost -- not found"
)
message
(
FATAL_ERROR
"Boost was not found - it is required to build KiCad"
)
endif
(
Boost_FOUND
)
# Here you can define what libraries of wxWidgets you need for your
# Here you can define what libraries of wxWidgets you need for your
# application. You can figure out what libraries you need here;
# application. You can figure out what libraries you need here;
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
# http://www.wxwidgets.org/manuals/2.8/wx_librarieslist.html
set
(
wxWidgets_USE_LIBS base core adv gl html net
)
set
(
wxWidgets_USE_LIBS base core adv gl html net
)
find_package
(
wxWidgetsCVS
)
find_package
(
wxWidgetsCVS
)
if
(
wxWidgets_FOUND
)
check_find_package_result
(
wxWidgets_FOUND
"wxWidgets"
)
message
(
STATUS
"Check for installed wxWidgets -- found"
)
else
(
wxWidgets_FOUND
)
message
(
STATUS
"Check for installed wxWidgets -- not found"
)
message
(
FATAL_ERROR
"wxWidgets was not found - it is required to build KiCad"
)
endif
(
wxWidgets_FOUND
)
# Include wxWidgets macros.
# Include wxWidgets macros.
include
(
${
wxWidgets_USE_FILE
}
)
include
(
${
wxWidgets_USE_FILE
}
)
...
...
CMakeModules/CheckFindPackageResult.cmake
0 → 100644
View file @
2c7eaa60
macro
(
check_find_package_result _VAR _PKGNAME
)
if
(
${
_VAR
}
)
message
(
STATUS
"Check for installed
${
_PKGNAME
}
-- found"
)
else
(
${
_VAR
}
)
message
(
STATUS
"Check for installed
${
_PKGNAME
}
-- not found"
)
message
(
FATAL_ERROR
"
${
_PKGNAME
}
was not found - it is required to build KiCad"
)
endif
(
${
_VAR
}
)
endmacro
(
check_find_package_result
)
CMakeModules/FindPackageHandleStandardArgs.cmake
View file @
2c7eaa60
...
@@ -41,9 +41,9 @@ MACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 )
...
@@ -41,9 +41,9 @@ MACRO(FIND_PACKAGE_HANDLE_STANDARD_ARGS _NAME _FAIL_MSG _VAR1 )
ENDFOREACH
(
_CURRENT_VAR
)
ENDFOREACH
(
_CURRENT_VAR
)
IF
(
${
_NAME_UPPER
}
_FOUND
)
IF
(
${
_NAME_UPPER
}
_FOUND
)
IF
(
NOT
${
_NAME
}
_FIND_QUIETLY
)
#
IF (NOT ${_NAME}_FIND_QUIETLY)
MESSAGE
(
STATUS
"Found
${
_NAME
}
:
${${
_VAR1
}}
"
)
#
MESSAGE(STATUS "Found ${_NAME}: ${${_VAR1}}")
ENDIF
(
NOT
${
_NAME
}
_FIND_QUIETLY
)
#
ENDIF (NOT ${_NAME}_FIND_QUIETLY)
ELSE
(
${
_NAME_UPPER
}
_FOUND
)
ELSE
(
${
_NAME_UPPER
}
_FOUND
)
IF
(
${
_NAME
}
_FIND_REQUIRED
)
IF
(
${
_NAME
}
_FIND_REQUIRED
)
MESSAGE
(
FATAL_ERROR
"
${
_FAIL_MESSAGE
}
"
)
MESSAGE
(
FATAL_ERROR
"
${
_FAIL_MESSAGE
}
"
)
...
...
kicad/minizip/CMakeLists.txt
View file @
2c7eaa60
find_package
(
ZLIB
)
find_package
(
ZLIB
QUIET
)
if
(
ZLIB_FOUND
)
if
(
ZLIB_FOUND
)
message
(
STATUS
"Check for installed zlib -- found"
)
message
(
STATUS
"Check for installed zlib -- found"
)
else
(
ZLIB_FOUND
)
else
(
ZLIB_FOUND
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment