Skip to content

Commit de4981b

Browse files
committed
Added Find SMILI CMake config file for projects using SMILI.
1 parent 80a3943 commit de4981b

File tree

1 file changed

+38
-0
lines changed

1 file changed

+38
-0
lines changed

CMake/FindSMILI.cmake

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
2+
# - Try to find SMILI
3+
# Once done this will define
4+
# SMILI_FOUND - System has SMILI
5+
# SMILI_INCLUDE_DIRS - The SMILI include directories
6+
# SMILI_LIBRARIES - The libraries needed to use SMILI
7+
# SMILI_DEFINITIONS - Compiler switches required for using SMILI
8+
9+
#~ find_package(PkgConfig)
10+
#~ pkg_check_modules(PC_LIBXML QUIET libmilx-SMILI)
11+
#~ set(SMILI_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER})
12+
13+
find_path(SMILI_INCLUDE_DIR NAMES milxImage.h milxFile.h
14+
HINTS "~/Dev/Install/include" "/usr/local/sMILX.1.0.0/include" "/usr/local/sMILX.0.99.9/include" "C:/Program Files (x86)/SMILX/include" "C:/Program Files/SMILX/include"
15+
PATH_SUFFIXES smili )
16+
17+
find_path(MILXQT_INCLUDE_DIRS NAMES milxQtImage.h milxQtMain.h
18+
HINTS "~/Dev/Install/include" "/usr/local/sMILX.1.0.0/include" "/usr/local/sMILX.0.99.9/include" "C:/Program Files (x86)/SMILX/include" "C:/Program Files/SMILX/include"
19+
PATH_SUFFIXES smili Qt )
20+
21+
find_library(SMILI_LIBRARY NAMES milx-SMILI
22+
HINTS "~/Dev/Install/lib" "/usr/local/sMILX.1.0.0/lib" "/usr/local/sMILX.0.99.9/lib" "C:/Program Files (x86)/SMILX/lib" "C:/Program Files/SMILX/lib")
23+
find_library(MILXQT_LIBRARY NAMES milx-Qt
24+
HINTS "~/Dev/Install/lib" "/usr/local/sMILX.1.0.0/lib" "/usr/local/sMILX.0.99.9/lib" "C:/Program Files (x86)/SMILX/lib" "C:/Program Files/SMILX/lib")
25+
find_library(VTK_EXT_LIBRARY NAMES vtk-ext
26+
HINTS "~/Dev/Install/lib" "/usr/local/sMILX.1.0.0/lib" "/usr/local/sMILX.0.99.9/lib" "C:/Program Files (x86)/SMILX/lib" "C:/Program Files/SMILX/lib")
27+
28+
set(SMILI_LIBRARIES ${SMILI_LIBRARY} ${MILXQT_LIBRARY} ${VTK_EXT_LIBRARY})
29+
MESSAGE("SMILI LIBRARIES: ${SMILI_LIBRARIES}")
30+
set(SMILI_INCLUDE_DIRS ${SMILI_INCLUDE_DIR} ${MILXQT_INCLUDE_DIRS} )
31+
32+
include(FindPackageHandleStandardArgs)
33+
# handle the QUIETLY and REQUIRED arguments and set SMILI_FOUND to TRUE
34+
# if all listed variables are TRUE
35+
find_package_handle_standard_args(SMILI DEFAULT_MSG
36+
SMILI_LIBRARY MILXQT_LIBRARY VTK_EXT_LIBRARY SMILI_INCLUDE_DIR)
37+
38+
mark_as_advanced(SMILI_INCLUDE_DIR SMILI_LIBRARIES )

0 commit comments

Comments
 (0)