Skip to content

Commit

Permalink
- fix linking order
Browse files Browse the repository at this point in the history
  • Loading branch information
SSE4 committed Feb 28, 2018
1 parent 7e088eb commit bb0f36e
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ class GTestConan(ConanFile):
settings = "os", "arch", "compiler", "build_type"
options = {"shared": [True, False], "build_gmock": [True, False], "fPIC": [True, False]}
default_options = ("shared=False", "build_gmock=True", "fPIC=True")


def configure(self):
if self.settings.os == "Windows":
Expand Down Expand Up @@ -71,12 +71,10 @@ def package(self):
self.copy(pattern="*.pdb", dst="bin", src=".", keep_path=False)

def package_info(self):
self.cpp_info.libs = ['gtest']
if self.options.build_gmock:
self.cpp_info.libs.append('gmock')
self.cpp_info.libs.append('gmock_main')
self.cpp_info.libs = ['gmock_main', 'gmock', 'gtest']
else:
self.cpp_info.libs.append('gtest_main')
self.cpp_info.libs = ['gtest_main', 'gtest']

if self.settings.os == "Linux":
self.cpp_info.libs.append("pthread")
Expand Down

0 comments on commit bb0f36e

Please sign in to comment.