]> git.cworth.org Git - apitrace/commitdiff
Always build the common library as static.
authorJosé Fonseca <jose.r.fonseca@gmail.com>
Wed, 5 Oct 2011 06:50:57 +0000 (07:50 +0100)
committerJosé Fonseca <jose.r.fonseca@gmail.com>
Wed, 5 Oct 2011 06:50:57 +0000 (07:50 +0100)
The wrappers rely on that.

Fixes build with -DBUILD_SHARED_LIBS:BOOL=ON (issue #44).

CMakeLists.txt

index 121a32287c0931eeb620d141b3f818660fcb5dc9..7d5db9274bc002604d181a5642da6cecf0bb1286 100755 (executable)
@@ -203,7 +203,7 @@ else (WIN32)
     set (glws glws_glx.cpp)
 endif (WIN32)
 
-add_library (common
+add_library (common STATIC
     common/trace_file.cpp
     common/trace_snappyfile.cpp
     common/trace_model.cpp
@@ -221,7 +221,7 @@ add_library (common
 
 set_target_properties (common PROPERTIES
     # Ensure it can be statically linked in shared libraries
-    COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_C_FLAGS}"
+    COMPILE_FLAGS "${CMAKE_SHARED_LIBRARY_CXX_FLAGS}"
 )
 
 link_libraries (common)