Skip to content

Commit

Permalink
Fix CMake issues on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
d1vanov committed Aug 5, 2016
1 parent 28f3516 commit 98bef0f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
6 changes: 6 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ else()
endif()
set(INSTALL_CMAKE_DIR ${DEF_INSTALL_CMAKE_DIR} CACHE PATH "Installation directory for CMake files")

if(MSVC)
set(QEVERCLOUD_LIBNAME_PREFIX "lib")
else()
set(QEVERCLOUD_LIBNAME_PREFIX "")
endif()

configure_file(QEverCloud/cmake/modules/QEverCloudBuildTreeSettings.cmake.in
${PROJECT_BINARY_DIR}/QEverCloud-${QEVERCLOUD_QT_VERSION}BuildTreeSettings.cmake @ONLY)
configure_file(QEverCloud/cmake/modules/QEverCloudConfig.cmake.in
Expand Down
6 changes: 1 addition & 5 deletions QEverCloud/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ list(APPEND ALL_HEADERS_AND_SOURCES ${GENERATED_HEADERS})
list(APPEND ALL_HEADERS_AND_SOURCES ${PRIVATE_HEADERS})
list(APPEND ALL_HEADERS_AND_SOURCES ${SOURCES})

if(MSVC)
set(LIBNAME "lib${QEVERCLOUD_QT_VERSION}qevercloud")
else()
set(LIBNAME "${QEVERCLOUD_QT_VERSION}qevercloud")
endif()
set(LIBNAME "${QEVERCLOUD_LIBNAME_PREFIX}${QEVERCLOUD_QT_VERSION}qevercloud")

if(APPLE)
# use, i.e. don't skip the full RPATH for the build tree
Expand Down
2 changes: 1 addition & 1 deletion QEverCloud/cmake/modules/QEverCloudConfig.cmake.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ endif()
include("${QEVERCLOUD_CMAKE_DIR}/QEverCloud-@[email protected]")

# These are IMPORTED targets created by FooBarLibraryDepends.cmake
set(QEVERCLOUD_LIBRARIES "@QEVERCLOUD_QT_VERSION@qevercloud")
set(QEVERCLOUD_LIBRARIES "@QEVERCLOUD_LIBNAME_PREFIX@@QEVERCLOUD_QT_VERSION@qevercloud")

set(QEVERCLOUD_FOUND TRUE)

Expand Down

0 comments on commit 98bef0f

Please sign in to comment.