forked from commontk/CTK
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request commontk#874 from kislinsk/fix-pythonlibs-handling
Fix PythonLibs handling
- Loading branch information
Showing
11 changed files
with
80 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#! | ||
#! Extracts the optimized library filepath from a list in the target_link_libraries() | ||
#! format, e. g. "optimized;release.lib;debug;debug.lib". | ||
#! | ||
#! If the list is a single filepath, return it instead. | ||
#! | ||
#! \param lib_list A target_link_libraries() library list or a single filepath. | ||
#! \param var_optimized_lib A variable name containing the output. | ||
#! | ||
function(ctkFunctionExtractOptimizedLibrary lib_list var_optimized_lib) | ||
|
||
list(LENGTH ${lib_list} lib_list_length) | ||
if(lib_list_length EQUAL 1) | ||
set(${var_optimized_lib} "${${lib_list}}" PARENT_SCOPE) | ||
return() | ||
endif() | ||
|
||
list(FIND ${lib_list} "optimized" optimized_keyword_index) | ||
if(optimized_keyword_index EQUAL -1) | ||
message(FATAL_ERROR "List \"${${lib_list}}\" does not contain \"optimized\" keyword") | ||
endif() | ||
|
||
math(EXPR last_lib_list_index "${lib_list_length} - 1") | ||
if(NOT optimized_keyword_index LESS last_lib_list_index) | ||
message(FATAL_ERROR "List \"${${lib_list}}\" ended unexpectedly") | ||
endif() | ||
|
||
math(EXPR optimized_lib_index "${optimized_keyword_index} + 1") | ||
list(GET ${lib_list} ${optimized_lib_index} optimized_lib) | ||
set(${var_optimized_lib} "${optimized_lib}" PARENT_SCOPE) | ||
|
||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
# | ||
# See CMake/ctkFunctionGetTargetLibraries.cmake | ||
# | ||
# | ||
# This file should list the libraries required to build the current CTK libraries | ||
# | ||
|
||
set(target_libraries | ||
PYTHON_LIBRARIES | ||
PYTHON_LIBRARY | ||
PYTHONQT_LIBRARIES | ||
CTKCore | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters