When we ask the question "what is the meaning of life", or more traditionally, "what is man's last end", we will find the answer is very simple, and very uncontroversial, man was made to be happy. But don't take my word for it, these are the words of Saint Augustine in the Enchiridion, "there is no true life except where there is happiness in life". The controversy concerns how man is to be happy.
The common answer in our times is that man is made happy by pleasures and leisure, and I trust that everyone here knows that pleasures are fleeting and are no use at all to make a man happy, but I shall take the example of Robin Williams and Anthony Bourdaine. If this lifestyle could work out for anyone, it would certainly be these men, who had wealth and no more responsibility than they wished to give themselves, but we all know that pleasures do not take away sorrows, and it is far too easy to believe that it isn't worth continuing to live when you have little to live for. If these pleasures are little consolation against the miseries of this life, consider how little they will be worth in the life to come, "Woe to you that are rich, for you have your consolation, woe to you that are filled: for you shall hunger."
Some may say that good friends or a wife and kids will make you happy, and certainly these are much greater than pleasures, and building a family is intrinsically good, while sex and wealth and other such things are indifferent of themselves (although we must remember that good proceeds from an integral cause but evil from any defect whatsoever). However it can easily be learned that these will not make you happy. Ask any man in a healthy marriage, and he will tell you that marriage is difficult. Ask any father and he will tell you that his children have given him much worry and grief. Your wife will certainly be worse than Eve, and yet her folly was the cause not merely of her own misery, nor of Adam's, but also your misery. You will be a worse father than Jacob, but the sins of his sons were a great hardship, and nearly killed him with grief. Other friendships are free from these great hardships, to an extent, but not because friends are better than family, but because they are less valuable.
But perhaps you simply want to continue your bloodline so that you can say your life was worth living, are you going to kill yourself after sowing your seed because you have no reason to continue living? Does your son's life need to be worth living to justify your life? Certainly it is worthwhile to build a family, but this cannot satisfy the human will which is ordered not to the particular good of procreation, but to the universal good. No particular good can satisfy the human longing for happiness, not even wisdom, which, if considered apart from friendship with God, does a man no good at all, for even if we ignore the vexation of growing in wisdom, as Solomon says "If the death of the fool and mine shall be one, what doth it avail me, that I have applied myself more to the study of wisdom?"
But God has abundantly declared what shall make a man happy, for Solomon in the same book says that one thing is not vain, "Fear God, and keep his commandments". David at the beginning of the Psalms says that the just man is happy because God knows his ways. Jesus says "come to me you weary, and I shall give you rest", and "blessed are the clean of heart, for they shall see God... Blessed are you when they shall revile you, and persecute you, and speak all that is evil against you, untruly, for my sake: Be glad and rejoice, for your reward is very great in heaven."
I shall add one last word from the book of Wisdom: "the souls of the just are in the hand of God, and the torment of death shall not touch them. In the sight of the unwise they seemed to die: and their departure was taken for misery: And their going away from us, for utter destruction: but they are in peace. And though in the sight of men they suffered torments, their hope is full of immortality. Afflicted in few things, in many they shall be well rewarded: because God hath tried them, and found them worthy of himself."