HAMLIB bundle cmake test code (commented), update Findhamlib, Findwxwidgets

This commit is contained in:
Charles J. Cliffe 2016-01-11 19:07:42 -05:00
parent 3236b23b51
commit 98aba86010
3 changed files with 53 additions and 2 deletions

View File

@ -49,7 +49,16 @@ if (USE_HAMLIB)
endif () endif ()
include_directories(${HAMLIB_INCLUDE_DIR}) include_directories(${HAMLIB_INCLUDE_DIR})
# IF(HAMLIB_STATIC_LIBRARY)
# link_libraries(${HAMLIB_STATIC_LIBRARY} usb ltdl)
# foreach(HAMLIB_STATIC_MOD ${HAMLIB_STATIC_MODS})
# link_libraries(${HAMLIB_STATIC_MOD})
# message(STATUS "Adding hamlib linkage ${HAMLIB_STATIC_MOD}")
# endforeach()
#
# ELSE()
link_libraries(${HAMLIB_LIBRARY}) link_libraries(${HAMLIB_LIBRARY})
# ENDIF()
ADD_DEFINITIONS(-DUSE_HAMLIB) ADD_DEFINITIONS(-DUSE_HAMLIB)
endif () endif ()
@ -658,6 +667,26 @@ IF (APPLE AND BUNDLE_APP)
ENDFOREACH() ENDFOREACH()
ENDIF(BUNDLE_SOAPY_MODS) ENDIF(BUNDLE_SOAPY_MODS)
# IF (USE_HAMLIB)
# get_filename_component(HAMLIB_LIBFOLDER ${HAMLIB_LIBRARY} DIRECTORY)
# file(GLOB HAMLIB_MODS ${HAMLIB_LIBFOLDER}/hamlib-*.so)
#
# FOREACH(HAMLIB_MOD_FILE ${HAMLIB_MODS})
# INSTALL( FILES "${HAMLIB_MOD_FILE}"
# DESTINATION "${APPS}/Contents/MacOS/Resources"
# COMPONENT Runtime
# )
# ENDFOREACH()
#
# FOREACH(HAMLIB_MOD_FILE ${HAMLIB_MODS})
# GET_FILENAME_COMPONENT(HAMLIB_MOD_NAME ${HAMLIB_MOD_FILE} NAME)
# message(STATUS "Bundling ${HAMLIB_MOD_NAME} from ${HAMLIB_MOD_FILE}")
# INSTALL(CODE "
# fixup_bundle(\"${APPS}\" \"${APPS}/Contents/MacOS/Resources/${HAMLIB_MOD_NAME}\" \"${HAMLIB_LIBFOLDER}\")
# " COMPONENT Runtime)
# ENDFOREACH()
# ENDIF()
INSTALL(CODE " INSTALL(CODE "
VERIFY_APP(\"${APPS}\") VERIFY_APP(\"${APPS}\")
" COMPONENT Runtime) " COMPONENT Runtime)

View File

@ -5,9 +5,9 @@
# Updates: # Updates:
# Jan 2015 - Add /opt/ paths for OSX MacPorts # Jan 2015 - Add /opt/ paths for OSX MacPorts
# - Fix HAMLIB_INCLUDE_DIR absolute search # - Fix HAMLIB_INCLUDE_DIR absolute search
# - Add static lib support
# TODO: # TODO:
# Windows support # Windows support
# Static support
# #
# HAMLIB_FOUND - system has Hamlib # HAMLIB_FOUND - system has Hamlib
# HAMLIB_LIBRARY - location of the library for hamlib # HAMLIB_LIBRARY - location of the library for hamlib
@ -38,10 +38,31 @@ find_library(HAMLIB_LIBRARY
/opt/local/lib/hamlib /opt/local/lib/hamlib
) )
find_library(HAMLIB_STATIC_LIBRARY
NAMES libhamlib.a
PATHS
/usr/lib64/hamlib
/usr/lib/hamlib
/usr/lib64
/usr/lib
/usr/local/lib64/hamlib
/usr/local/lib/hamlib
/usr/local/lib64
/usr/local/lib
/opt/local/lib
/opt/local/lib/hamlib
)
GET_FILENAME_COMPONENT(HAMLIB_LIB_FOLDER ${HAMLIB_STATIC_LIBRARY} DIRECTORY)
file(GLOB HAMLIB_STATIC_MODS ${HAMLIB_LIB_FOLDER}/hamlib-*.a)
if(HAMLIB_INCLUDE_DIR AND HAMLIB_LIBRARY) if(HAMLIB_INCLUDE_DIR AND HAMLIB_LIBRARY)
set(HAMLIB_FOUND TRUE) set(HAMLIB_FOUND TRUE)
# message(STATUS "Hamlib version: ${VERSION}") # message(STATUS "Hamlib version: ${VERSION}")
message(STATUS "Found hamlib library directory at: ${HAMLIB_LIBRARY}") message(STATUS "Found hamlib library at: ${HAMLIB_LIBRARY}")
message(STATUS "Found hamlib static library at: ${HAMLIB_STATIC_LIBRARY}")
message(STATUS "Found hamlib static modules: ${HAMLIB_STATIC_MODS}")
message(STATUS "Found hamlib include directory at: ${HAMLIB_INCLUDE_DIR}") message(STATUS "Found hamlib include directory at: ${HAMLIB_INCLUDE_DIR}")
endif(HAMLIB_INCLUDE_DIR AND HAMLIB_LIBRARY) endif(HAMLIB_INCLUDE_DIR AND HAMLIB_LIBRARY)

View File

@ -460,6 +460,7 @@ if(wxWidgets_FIND_STYLE STREQUAL "win32")
D:/ D:/
ENV ProgramFiles ENV ProgramFiles
PATH_SUFFIXES PATH_SUFFIXES
wxWidgets-3.0.2
wxWidgets-3.0.0 wxWidgets-3.0.0
wxWidgets-2.9.5 wxWidgets-2.9.5
wxWidgets-2.9.4 wxWidgets-2.9.4