Skip to content

Commit

Permalink
CMake: Don't use exported SDK libs if present in current build
Browse files Browse the repository at this point in the history
Once installed, CMake will find the SDK libs in the installation
location (at least on Windows). This should ensure that the libs
from the current build are used, if they are present.
  • Loading branch information
skyjake committed Feb 23, 2015
1 parent 3357df6 commit df45454
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 11 deletions.
8 changes: 6 additions & 2 deletions doomsday/sdk/libappfw/DengAppfwConfig.cmake
@@ -1,6 +1,10 @@
find_package (Qt5Widgets REQUIRED)
find_package (DengCore REQUIRED)
find_package (DengGui REQUIRED)
find_package (DengShell REQUIRED)
find_package (Qt5Widgets REQUIRED)

include ("${CMAKE_CURRENT_LIST_DIR}/DengAppfw.cmake")
# Deng::libappfw may exist in the current build, in which case using
# a previously installed version is inappropriate.
if (NOT TARGET Deng::libappfw)
include ("${CMAKE_CURRENT_LIST_DIR}/DengAppfw.cmake")
endif ()
9 changes: 6 additions & 3 deletions doomsday/sdk/libcore/DengCoreConfig.cmake
@@ -1,6 +1,9 @@
find_package (Qt5Core)
find_package (Qt5Network)
find_package (Qt5 COMPONENTS Core Network REQUIRED)

include ("${CMAKE_CURRENT_LIST_DIR}/DengCore.cmake")
# Deng::libcore may exist in the current build, in which case using
# a previously installed version is inappropriate.
if (NOT TARGET Deng::libcore)
include ("${CMAKE_CURRENT_LIST_DIR}/DengCore.cmake")
endif ()

list (APPEND DENG_REQUIRED_PACKAGES net.dengine.stdlib)
9 changes: 6 additions & 3 deletions doomsday/sdk/libgui/DengGuiConfig.cmake
@@ -1,7 +1,10 @@
find_package (Qt5 COMPONENTS Gui OpenGL REQUIRED)
find_package (DengCore REQUIRED)
find_package (Qt5Gui REQUIRED)
find_package (Qt5OpenGL REQUIRED)

include ("${CMAKE_CURRENT_LIST_DIR}/DengGui.cmake")
# Deng::libgui may exist in the current build, in which case using
# a previously installed version is inappropriate.
if (NOT TARGET Deng::libgui)
include ("${CMAKE_CURRENT_LIST_DIR}/DengGui.cmake")
endif ()

list (APPEND DENG_REQUIRED_PACKAGES net.dengine.stdlib.gui)
8 changes: 6 additions & 2 deletions doomsday/sdk/liblegacy/DengLegacyConfig.cmake
@@ -1,3 +1,7 @@
find_package (DengCore REQUIRED)
find_package (DengCore REQUIRED)

include ("${CMAKE_CURRENT_LIST_DIR}/DengLegacy.cmake")
# Deng::liblegacy may exist in the current build, in which case using
# a previously installed version is inappropriate.
if (NOT TARGET Deng::liblegacy)
include ("${CMAKE_CURRENT_LIST_DIR}/DengLegacy.cmake")
endif ()
6 changes: 5 additions & 1 deletion doomsday/sdk/libshell/DengShellConfig.cmake
@@ -1,3 +1,7 @@
find_package (DengCore REQUIRED)

include ("${CMAKE_CURRENT_LIST_DIR}/DengShell.cmake")
# Deng::libshell may exist in the current build, in which case using
# a previously installed version is inappropriate.
if (NOT TARGET Deng::libshell)
include ("${CMAKE_CURRENT_LIST_DIR}/DengShell.cmake")
endif ()

0 comments on commit df45454

Please sign in to comment.