title: How to set up qt4 with cmake in Ubuntu?
body: <p>I'm currently trying to set up qt4 to work with cmake in the CLion IDE, however I'm having trouble specifying the install path. I'm running Ubuntu so I downloaded qt4 with <code>sudo apt install qt4-default</code>. Where does this install it to? How do I tell cmake where to find the package configuration files?</p>
  
  <p>This is my CMakeLists.txt file:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.15)
  project(ContactClasses)
  
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
  set(SOURCE_FILES main.cpp Contact.h Contact.cpp ContactList.h ContactList.cpp ContactFactory.h ContactFactory.cpp)
  set(CMAKE_PREFIX_PATH "/usr/share/qt4")
  
  find_package(Qt4Core REQUIRED)
  
  add_executable(Homework_6 ${SOURCE_FILES})
  
  target_link_libraries(ContactClasses Qt4::Core)
  </code></pre>
  
  <p>I get this error when I try to reload it:</p>
  
  <pre><code>CMake Error at CMakeLists.txt:8 (find_package):
    By not providing "FindQt4Core.cmake" in CMAKE_MODULE_PATH this project has
    asked CMake to find a package configuration file provided by "Qt4Core", but
    CMake did not find one.
  
    Could not find a package configuration file provided by "Qt4Core" with any
    of the following names:
  
      Qt4CoreConfig.cmake
      qt4core-config.cmake
  
    Add the installation prefix of "Qt4Core" to CMAKE_PREFIX_PATH or set
    "Qt4Core_DIR" to a directory containing one of the above files.  If
    "Qt4Core" provides a separate development package or SDK, be sure it has
    been installed.
  </code></pre>