--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,16 +1,7 @@
-CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+CMAKE_MINIMUM_REQUIRED(VERSION 3.4.3)
 PROJECT(SGP4)
 
-include(CheckCXXCompilerFlag)
-CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
-if(COMPILER_SUPPORTS_CXX11)
-    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-else()
-    message(SEND_ERROR "The compiler ${CMAKE_CXX_COMPILER} doesnt support C++11.") 
-endif()
-
-set(CMAKE_EXPORT_COMPILE_COMMANDS ON)
-
+if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wextra")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wshadow")
@@ -19,12 +10,8 @@ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pedantic")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-long-long")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wcast-align")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wsign-conversion")
+endif()
 
 include_directories(libsgp4)
 
 add_subdirectory(libsgp4)
-add_subdirectory(sattrack)
-add_subdirectory(runtest)
-add_subdirectory(passpredict)
-
-file(COPY SGP4-VER.TLE DESTINATION ${PROJECT_BINARY_DIR})
--- a/libsgp4/CMakeLists.txt
+++ b/libsgp4/CMakeLists.txt
@@ -35,7 +35,10 @@ set(SRCS
      Vector.h
      )
 
-add_library(sgp4 STATIC ${SRCS} ${INCS})
-add_library(sgp4s SHARED ${SRCS} ${INCS})
-install( TARGETS sgp4s LIBRARY DESTINATION lib )
+add_library(sgp4 ${SRCS} ${INCS})
+if(WIN32 AND BUILD_SHARED_LIBS)
+  set_target_properties(sgp4 PROPERTIES WINDOWS_EXPORT_ALL_SYMBOLS TRUE)
+endif()
+set_target_properties(sgp4 PROPERTIES CXX_STANDARD 11)
+install( TARGETS sgp4 RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib)
 install( FILES ${INCS} DESTINATION include/SGP4 )
