]> git.donarmstrong.com Git - bamtools.git/blobdiff - src/api/CMakeLists.txt
Related to last commit - fixed another instance of '_WIN32'
[bamtools.git] / src / api / CMakeLists.txt
index 45005645098e133fb1daca630e49920b8dc76f6e..a9dd0924a2925e7c661f71e6267b02489961b943 100644 (file)
@@ -13,7 +13,7 @@ add_definitions( -DBAMTOOLS_API_LIBRARY ) # (for proper exporting of library sym
 add_definitions( -fPIC ) # (attempt to force PIC compiling on CentOS, not being set on shared libs by CMake)
 
 # fetch all internal source files
-add_subdirectory ( internal )
+add_subdirectory( internal )
 
 # make list of all API source files
 set( BamToolsAPISources
@@ -33,20 +33,22 @@ set( BamToolsAPISources
 
 # create main BamTools API shared library
 add_library( BamTools SHARED ${BamToolsAPISources} )
-set_target_properties( BamTools PROPERTIES SOVERSION "2.0.5" )
-set_target_properties( BamTools PROPERTIES OUTPUT_NAME "bamtools" )
+set_target_properties( BamTools PROPERTIES
+                       SOVERSION "2.2.3"
+                       OUTPUT_NAME "bamtools" )
 
 # create main BamTools API static library
 add_library( BamTools-static STATIC ${BamToolsAPISources} )
-set_target_properties( BamTools-static PROPERTIES OUTPUT_NAME "bamtools" )
-set_target_properties( BamTools-static PROPERTIES PREFIX "lib" )
+set_target_properties( BamTools-static PROPERTIES 
+                       OUTPUT_NAME "bamtools" 
+                       PREFIX "lib" )
 
-# link libraries with zlib automatically
-if ( _WIN32 )
+# link libraries automatically with zlib (and Winsock2, if applicable)
+ifWIN32 )
     set( APILibs z ws2_32 )
-else ( _WIN32 )
+else()
     set( APILibs z )
-endif ( _WIN32 )
+endif()
 
 target_link_libraries( BamTools ${APILibs} )
 target_link_libraries( BamTools-static ${APILibs} )
@@ -77,5 +79,5 @@ ExportHeader(APIHeaders SamReadGroupDictionary.h ${ApiIncludeDir})
 ExportHeader(APIHeaders SamSequence.h            ${ApiIncludeDir})
 ExportHeader(APIHeaders SamSequenceDictionary.h  ${ApiIncludeDir})
 
-set(AlgorithmsIncludeDir "api/algorithms")
-ExportHeader(AlgorithmsHeaders algorithms/Sort.h ${AlgorithmsIncludeDir})
+set( AlgorithmsIncludeDir "api/algorithms" )
+ExportHeader( AlgorithmsHeaders algorithms/Sort.h ${AlgorithmsIncludeDir} )