title: convert from make to cmake
body: <p>I've followed tutorials and looked at examples but I still can not get a build working repo with make to compile after converting to  cmake on a MacBook Pro.  The commented out code in the cmake file combines the efforts to reference other stack exchange comments.</p>
  <p><strong>Makefile</strong></p>
  <pre><code># tool macros
  CC := g++
  # TODO: Get rid of -Wunused-command-line-argument warnings
  CCFLAGS := -lcurl -std=c++11
  DBGFLAGS := -g
  CCOBJFLAGS := $(CCFLAGS) -c
  
  # path macros
  BIN_PATH := bin
  OBJ_PATH := obj
  SRC_PATH := src
  DBG_PATH := debug
  
  # compile macros
  TARGET_NAME := light-thing
  ifeq ($(OS),Windows_NT)
      TARGET_NAME := $(addsuffix .exe,$(TARGET_NAME))
  endif
  TARGET := $(BIN_PATH)/$(TARGET_NAME)
  TARGET_DEBUG := $(DBG_PATH)/$(TARGET_NAME)
  
  # src files &amp; obj files
  SRC := $(foreach x, $(SRC_PATH), $(wildcard $(addprefix $(x)/*,.c*)))
  OBJ := $(addprefix $(OBJ_PATH)/, $(addsuffix .o, $(notdir $(basename $(SRC)))))
  OBJ_DEBUG := $(addprefix $(DBG_PATH)/, $(addsuffix .o, $(notdir $(basename $(SRC)))))
  
  # clean files list
  DISTCLEAN_LIST := $(OBJ) \
                    $(OBJ_DEBUG)
  CLEAN_LIST := $(TARGET) \
                $(TARGET_DEBUG) \
                $(DISTCLEAN_LIST)
  
  # default rule
  default: makedir all
  
  # non-phony targets
  $(TARGET): $(OBJ)
      $(CC) $(CCFLAGS) -o $@ $(OBJ)
  
  $(OBJ_PATH)/%.o: $(SRC_PATH)/%.c*
      $(CC) $(CCOBJFLAGS) -o $@ $&lt;
  
  $(DBG_PATH)/%.o: $(SRC_PATH)/%.c*
      $(CC) $(CCOBJFLAGS) $(DBGFLAGS) -o $@ $&lt;
  
  $(TARGET_DEBUG): $(OBJ_DEBUG)
      $(CC) $(CCFLAGS) $(DBGFLAGS) $(OBJ_DEBUG) -o $@
  
  # phony rules
  .PHONY: makedir
  makedir:
      @mkdir -p $(BIN_PATH) $(OBJ_PATH) $(DBG_PATH)
  
  .PHONY: all
  all: $(TARGET)
  
  .PHONY: debug
  debug: $(TARGET_DEBUG)
  
  .PHONY: clean
  clean:
      @echo CLEAN $(CLEAN_LIST)
      @rm -f $(CLEAN_LIST)
  
  .PHONY: distclean
  distclean:
      @echo CLEAN $(CLEAN_LIST)
      @rm -f $(DISTCLEAN_LIST)
  </code></pre>
  <p><strong>current CMakeLists</strong></p>
  <pre><code>cmake_minimum_required(VERSION 3.8)
  project(hue_console VERSION 1.0.0 LANGUAGES CXX)
  option(huecon_BUILD_TESTS OFF)
  
  set(CMAKE_BUILD_TYPE Debug)
  if(NOT CMAKE_BUILD_TYPE)
      set(CMAKE_BUILD_TYPE Release)
  endif()
  
  set(CMAKE_CXX_FLAGS &quot;-Wall -Wextra -fpermissive -Wno-unused-variable -Wno-unused-parameter -Wno-maybe-uninitialized -Wno-comment&quot;)
  set(CMAKE_CXX_FLAGS_DEBUG &quot;-g&quot;)
  set(CMAKE_CXX_FLAGS_RELEASE &quot;-O3&quot;)
  set(CMAKE_CXX_STANDARD 17)
  set(CMAKE_CXX_STANDARD_REQUIRED ON)
  
  # set(CMAKE_CXX_STANDARD_REQUIRED ON)
  # set(CMAKE_CXX_EXTENSIONS OFF)
  # # Fix behavior of CMAKE_CXX_STANDARD when targeting macOS.
  # if (POLICY CMP0025)
  #   cmake_policy(SET CMP0025 NEW)
  # endif ()
  
  set(Boost_USE_STATIC_LIBS OFF) 
  set(Boost_USE_MULTITHREADED ON)  
  set(Boost_USE_STATIC_RUNTIME OFF) 
  #find_package(Boost 1.45.0 COMPONENTS property_tree) 
  find_package(Boost REQUIRED)
  if(Boost_FOUND)
    include_directories(include)
    include_directories(${Boost_INCLUDE_DIRS}) 
    file(GLOB SOURCES &quot;src/*.cpp&quot;)
    #target_link_libraries(progname ${Boost_LIBRARIES})
  else(Boost_FOUND)
    message(FATAL_ERROR &quot;Could not find the boost required.&quot;)
  endif()
  
  find_package(CURL)
  set(requiredlibs)
  if(CURL_FOUND)
    include_directories(${CURL_INCLUDE_DIRS})
    set(requiredlibs ${requiredlibs} ${CURL_LIBRARIES})
  else(CURL_FOUND)
    message(FATAL_ERROR &quot;Could not find the CURL library / dev files.&quot;)
  endif(CURL_FOUND)
  
  add_executable(hue_console 
    ${SOURCES})
  </code></pre>
  <p><strong>cmake output</strong></p>
  <pre><code>mreff555@Dans-MBP build % cmake ..
  -- The CXX compiler identification is AppleClang 13.1.6.13160021
  -- Detecting CXX compiler ABI info
  -- Detecting CXX compiler ABI info - done
  -- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefaul
  t.xctoolchain/usr/bin/c++ - skipped
  -- Detecting CXX compile features
  -- Detecting CXX compile features - done
  -- Found Boost: /usr/local/lib/cmake/Boost-1.78.0/BoostConfig.cmake (found version &quot;1.78.0&quot;)
  -- Found CURL: /usr/local/lib/libcurl.dylib (found version &quot;7.79.1&quot;)
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /Users/mreff555/src/hue-api/build    
  </code></pre>
  <p><strong>cmake -&gt; make output</strong></p>
  <pre><code>mreff555@Dans-MBP build % make
  Consolidate compiler generated dependencies of target hue_console
  [ 10%] Linking CXX executable hue_console
  Undefined symbols for architecture x86_64:
    &quot;_curl_easy_cleanup&quot;, referenced from:
        Command::get(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in command.cpp.o
        Command::post(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;, std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in comman
  d.cpp.o
        Command::put(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;, std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in command
  .cpp.o
    &quot;_curl_easy_init&quot;, referenced from:
        Command::get(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in command.cpp.o
        Command::post(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;, std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in comman
  d.cpp.o
        Command::put(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;, std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in command
  .cpp.o
    &quot;_curl_easy_perform&quot;, referenced from:
        Command::get(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in command.cpp.o
        Command::post(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;, std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in comman
  d.cpp.o
        Command::put(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;, std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in command
  .cpp.o
    &quot;_curl_easy_setopt&quot;, referenced from:
        Command::get(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in command.cpp.o
        Command::post(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;, std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in comman
  d.cpp.o
        Command::put(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;, std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in command
  .cpp.o
    &quot;_curl_easy_strerror&quot;, referenced from:
        Command::get(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in command.cpp.o
        Command::post(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;, std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in comman
  d.cpp.o
    &quot;_curl_global_cleanup&quot;, referenced from:
        Command::~Command() in command.cpp.o
    &quot;_curl_global_init&quot;, referenced from:
        Command::Command(std::__1::shared_ptr&lt;Config&gt;) in command.cpp.o
    &quot;_curl_slist_append&quot;, referenced from:
        Command::put(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;, std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in command
  .cpp.o
    &quot;_curl_slist_free_all&quot;, referenced from:
        Command::put(std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;, std::__1::basic_string&lt;char, std::__1::char_traits&lt;char&gt;, std::__1::allocator&lt;char&gt; &gt;) in command
  .cpp.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make[2]: *** [hue_console] Error 1
  make[1]: *** [CMakeFiles/hue_console.dir/all] Error 2
  make: *** [all] Error 2
  </code></pre>