find_package(PkgConfig REQUIRED) pkg_search_module(POPT REQUIRED popt) include_directories("../include" ${POPT_INCLUDE_DIRS}) add_executable(mazemaker mazemaker.c) target_link_directories(mazemaker PUBLIC ${POPT_LIBRARY_DIRS}) target_link_libraries(mazemaker mazemaker_shared ${POPT_LIBRARIES}) install (TARGETS mazemaker DESTINATION bin)