diff options
author | Maxim Biro <nurupo.contributions@gmail.com> | 2017-04-16 05:57:21 -0400 |
---|---|---|
committer | Maxim Biro <nurupo.contributions@gmail.com> | 2017-04-22 15:31:25 -0400 |
commit | c7f63737ebfff2d1948ec9d6d92295a75d75cae5 (patch) | |
tree | ffaa46d8aecb53041ed61f6be73a4743fae6d4b1 /cmake/ModulePackage.cmake | |
parent | 5ed37e543825c023163adba95b99ea81d3337196 (diff) |
Revert "Implement tox_loop"
This reverts commit 5ff099763b1f56414572e1c12eb2f003117db5a0.
Diffstat (limited to 'cmake/ModulePackage.cmake')
-rw-r--r-- | cmake/ModulePackage.cmake | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/cmake/ModulePackage.cmake b/cmake/ModulePackage.cmake index 4d22ee41..3a4eb9b9 100644 --- a/cmake/ModulePackage.cmake +++ b/cmake/ModulePackage.cmake | |||
@@ -2,8 +2,6 @@ option(ENABLE_SHARED "Build shared (dynamic) libraries for all modules" ON) | |||
2 | option(ENABLE_STATIC "Build static libraries for all modules" ON) | 2 | option(ENABLE_STATIC "Build static libraries for all modules" ON) |
3 | option(COMPILE_AS_CXX "Compile all C code as C++ code" OFF) | 3 | option(COMPILE_AS_CXX "Compile all C code as C++ code" OFF) |
4 | 4 | ||
5 | include(FindPackageHandleStandardArgs) | ||
6 | |||
7 | if(NOT ENABLE_SHARED AND NOT ENABLE_STATIC) | 5 | if(NOT ENABLE_SHARED AND NOT ENABLE_STATIC) |
8 | message(WARNING | 6 | message(WARNING |
9 | "Both static and shared libraries are disabled; " | 7 | "Both static and shared libraries are disabled; " |
@@ -50,31 +48,6 @@ function(pkg_use_module mod pkg) | |||
50 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isystem ${dir}" PARENT_SCOPE) | 48 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isystem ${dir}" PARENT_SCOPE) |
51 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${dir}" PARENT_SCOPE) | 49 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${dir}" PARENT_SCOPE) |
52 | endforeach() | 50 | endforeach() |
53 | else() | ||
54 | set(${mod}_DEFINITIONS ${${mod}_CFLAGS_OTHER}) | ||
55 | find_path(${mod}_INCLUDE_DIR NAMES ${ARGV1}.h | ||
56 | HINTS ${${mod}_INCLUDEDIR} ${${mod}_INCLUDE_DIRS} | ||
57 | PATH_SUFFIXES ${ARGV1}) | ||
58 | find_library(${mod}_LIBRARY NAMES ${ARGV1} lib${ARGV1} | ||
59 | HINTS ${${mod}_LIBDIR} ${${mod}_LIBRARY_DIRS}) | ||
60 | find_package_handle_standard_args(${mod} DEFAULT_MSG | ||
61 | ${mod}_LIBRARY ${mod}_INCLUDE_DIR) | ||
62 | |||
63 | if(${mod}_FOUND) | ||
64 | mark_as_advanced(${mod}_INCLUDE_DIR ${mod}_LIBRARY) | ||
65 | set(${mod}_LIBRARIES ${${mod}_LIBRARY} PARENT_SCOPE) | ||
66 | set(${mod}_INCLUDE_DIRS ${${mod}_INCLUDE_DIR} PARENT_SCOPE) | ||
67 | set(${mod}_FOUND TRUE PARENT_SCOPE) | ||
68 | link_directories(${${mod}_LIBRARY_DIRS}) | ||
69 | include_directories(${${mod}_INCLUDE_DIRS}) | ||
70 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} ${${mod}_CFLAGS_OTHER}" PARENT_SCOPE) | ||
71 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${${mod}_CFLAGS_OTHER}" PARENT_SCOPE) | ||
72 | |||
73 | foreach(dir ${${mod}_INCLUDE_DIRS}) | ||
74 | set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -isystem ${dir}" PARENT_SCOPE) | ||
75 | set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${dir}" PARENT_SCOPE) | ||
76 | endforeach() | ||
77 | endif() | ||
78 | endif() | 51 | endif() |
79 | endfunction() | 52 | endfunction() |
80 | 53 | ||