This Shloka is also found in at-least two Puranas, besides other scriptures.
1. Bhavishya Purana:
- Verse 57, Chapter 7, Part 1 (Brahma Khanda).
Chapter 7 - Brahma Parva, Bhavishya Purana
वेदः स्मृतिः सदाचारः स्वस्य च प्रियमात्मनः ।
एतच्चतुर्विधं विप्राः
साक्षाद्धर्मस्य लक्षणम् ॥ ५७ ॥
Meaning:
Vedas, smritis, suitable (approved) tradition, and what is agreeable to one's conscience, the wise have declared to be the four direct pieces of evidence of dharma.
This verse is exactly similar to that asked in the question
2. Vishnu-Dharmottara Purana
- Verse 63, Chapter 233, Part 3
Chapter 233, Tritiya Khanda, Vishnudharmottara Purana
वेदः स्मृतिः सदाचारः स्वस्य च प्रियमात्मनः ।
एतच्चतुर्विधं प्राहुः
साधूनां धर्मलक्षणम् ॥ ६३ ॥
Here, the second line of the verse is a bit different from the original one.
Instead of साक्षाद्धर्मस्य लक्षणम्
we have साधूनां धर्मलक्षणम्
On a side Note:
As already said by one of the users in the comments, a similar verse is also found in the Yajnavalkya Smriti
Verse 7, Chapter 1, Yajnavalkya Smriti
श्रुतिः स्मृतिः सदाचारः स्खस्य च प्रियमात्मनः ।
सम्यक्संकल्पजः कामो
धर्ममूलमिदं स्मृतम् ॥ ७ ॥
VII. — The Sruti, the Smiriti, the conduct of good men, what appears
pleasant to one's own self, and the desire that springs from a good
resolution, is said to be the root of Dharma.
One may access the English Translation along with the commentary of Vijnanevara called the Mitaksara from here