File tree Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Expand file tree Collapse file tree 2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 11cmake_minimum_required (VERSION  "3.12" )
22
3- project ("HelloWorld" )
3+ project ("HelloWorld"  VERSION  0.1.0)
4+ 
5+ add_library (sse sse/sse.cpp)
6+ set_target_properties (sse PROPERTIES PUBLIC_HEADER  sse/sse.hpp)
7+ # Set up library includes 
8+ target_include_directories (sse
9+     PRIVATE 
10+         ${CMAKE_CURRENT_SOURCE_DIR} /helloworld
11+     PUBLIC 
12+         $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR} /helloworld>
13+         $<INSTALL_INTERFACE:${CMAKE_INSTALL_INCLUDEDIR} /helloworld>
14+ )
415
516add_executable (helloworld main.cpp)
17+ target_link_libraries (helloworld PRIVATE  sse)
18+ 
19+ # Create install targets 
20+ include (GNUInstallDirs)
21+ install (TARGETS helloworld sse
22+   LIBRARY DESTINATION  ${CMAKE_INSTALL_LIBDIR} 
23+   ARCHIVE DESTINATION  ${CMAKE_INSTALL_LIBDIR} 
24+   RUNTIME DESTINATION  ${CMAKE_INSTALL_BINDIR} 
25+   PUBLIC_HEADER  DESTINATION  ${CMAKE_INSTALL_INCLUDEDIR} /helloworld
26+   INCLUDES DESTINATION  ${CMAKE_INSTALL_INCLUDEDIR} /helloworld
27+   )
Original file line number Diff line number Diff line change 11#include  < iostream> 
22
3+ #include  " sse/sse.hpp" 
4+ 
35int  main (int  argc, char  *argv[])
46{
57  std::cout << " Hello World!" 
8+   sse ();
69  return  0 ;
710}
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments